Clean up a variable declaration.
Making this a const variable gets rid of a compiler warning, and making it a reference eliminates an unnecessary copy.
This commit is contained in:
parent
d49b183fb1
commit
b47d14258c
1 changed files with 1 additions and 1 deletions
|
@ -917,7 +917,7 @@ void editor_controller::toggle_grid()
|
||||||
void editor_controller::unit_description()
|
void editor_controller::unit_description()
|
||||||
{
|
{
|
||||||
map_location loc = gui_->mouseover_hex();
|
map_location loc = gui_->mouseover_hex();
|
||||||
unit_map units = context_manager_->get_map_context().get_units();
|
const unit_map & units = context_manager_->get_map_context().get_units();
|
||||||
const unit_map::const_unit_iterator un = units.find(loc);
|
const unit_map::const_unit_iterator un = units.find(loc);
|
||||||
if(un != units.end()) {
|
if(un != units.end()) {
|
||||||
help::show_unit_help(*gui_, un->type_id(), false);
|
help::show_unit_help(*gui_, un->type_id(), false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue