Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
TangSiyang2001 committed Aug 28, 2024
1 parent f81b475 commit 8d3982f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions be/src/http/action/compaction_score_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,9 @@ Status CompactionScoreAction::_handle(size_t top_n, bool sync_meta, std::string*
rapidjson::Document root;
root.SetArray();
auto& allocator = root.GetAllocator();
std::ranges::for_each(scores | std::views::take(top_n), [&root, &allocator](const auto& score) {
for (const auto& score : scores | std::views::take(top_n)) {
root.PushBack(jsonfy_tablet_compaction_score(score, allocator), allocator);
});

}
rapidjson::StringBuffer str_buf;
rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(str_buf);
root.Accept(writer);
Expand Down

0 comments on commit 8d3982f

Please sign in to comment.