Skip to content

Commit

Permalink
#1395: lb: reduce scope of variable based on Codacy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Aug 23, 2021
1 parent 77ebe08 commit c1ad7c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/greedylb/greedylb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void GreedyLB::recvObjsDirect(std::size_t len, GreedyLBTypes::ObjIDType* objs) {
}

void GreedyLB::transferObjs(std::vector<GreedyProc>&& in_load) {
std::size_t max_recs = 1, max_bytes = 0;
std::size_t max_recs = 1;
std::vector<GreedyProc> load(std::move(in_load));
std::vector<std::vector<GreedyLBTypes::ObjIDType>> node_transfer(load.size());
for (auto&& elm : load) {
Expand All @@ -290,7 +290,7 @@ void GreedyLB::transferObjs(std::vector<GreedyProc>&& in_load) {
}

if (strat_ == DataDistStrategy::scatter) {
max_bytes = max_recs * sizeof(GreedyLBTypes::ObjIDType);
std::size_t max_bytes = max_recs * sizeof(GreedyLBTypes::ObjIDType);
vt_debug_print(
normal, lb,
"GreedyLB::transferObjs: max_recs={}, max_bytes={}\n",
Expand Down

0 comments on commit c1ad7c7

Please sign in to comment.