Skip to content

Commit

Permalink
Fix C4456 scope_logging_object hides previous local declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryLundberg committed Dec 3, 2016
1 parent fbfe092 commit 5667fa2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/generators/default_map_generator_job.cpp
Expand Up @@ -940,7 +940,7 @@ std::string default_map_generator_job::default_generate_map(generator_data data,

for(int player = 0; player != data.nplayers; ++player) {
LOG_NG << "placing castle for " << player << "\n";
log_scope("placing castle");
lg::scope_logger inner_scope_logging_object__(lg::general(), "placing castle");
const int min_x = data.width/3 + 3;
const int min_y = data.height/3 + 3;
const int max_x = (data.width/3)*2 - 4;
Expand Down Expand Up @@ -996,7 +996,7 @@ std::string default_map_generator_job::default_generate_map(generator_data data,

road_path_calculator calc(terrain, cfg, rng_());
for(int road = 0; road != nroads; ++road) {
log_scope("creating road");
lg::scope_logger another_inner_scope_logging_object__(lg::general(), "creating road");

/*
* We want the locations to be on the portion of the map we're actually
Expand Down
2 changes: 1 addition & 1 deletion src/gui/core/canvas.cpp
Expand Up @@ -1441,7 +1441,7 @@ void canvas::draw(const bool force)

// draw items
for(auto& shape : shapes_) {
log_scope2(log_gui_draw, "Canvas: draw shape.");
lg::scope_logger inner_scope_logging_object__(log_gui_draw, "Canvas: draw shape.");

shape->draw(canvas_, renderer_, variables_);
}
Expand Down
2 changes: 1 addition & 1 deletion src/units/unit.cpp
Expand Up @@ -2274,7 +2274,7 @@ void unit::apply_modifications()
lg::wml_error() << "[modifications][advance] is deprecated, use [advancement] instead\n";
}
for(const config &m : modifications_.child_range(mod)) {
log_scope("add mod");
lg::scope_logger inner_scope_logging_object__(lg::general(), "add mod");
add_modification(ModificationTypes[i], m, true);
}
}
Expand Down

0 comments on commit 5667fa2

Please sign in to comment.