Skip to content

Commit

Permalink
Suppress warning about const variable
Browse files Browse the repository at this point in the history
Supress CID 1134314 about 'code' being constant. Removed the TODO and dead code.
  • Loading branch information
GregoryLundberg authored and Vultraz committed Oct 27, 2017
1 parent 9ea0595 commit 2d0b246
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/editor/palette/unit_palette.cpp
Expand Up @@ -39,15 +39,9 @@ void unit_palette::setup(const config& /*cfg*/)
item_map_.emplace(i.second.id(), i.second);
group_map_[i.second.race_id()].push_back(i.second.id());
nmax_items_ = std::max<int>(nmax_items_, group_map_[i.second.race_id()].size());
// TODO: Implement the concept of "core" units
bool core = true;
if(core) {
// Add the unit to the default group
group_map_["all"].push_back(i.second.id());
nmax_items_ = std::max<int>(nmax_items_, group_map_["all"].size());
} else {
non_core_items_.insert(i.second.id());
}
// Add the unit to the default group
group_map_["all"].push_back(i.second.id());
nmax_items_ = std::max<int>(nmax_items_, group_map_["all"].size());
}

for(const race_map::value_type &i : unit_types.races()) {
Expand Down

0 comments on commit 2d0b246

Please sign in to comment.