Skip to content

Commit

Permalink
Help: removed an unnecessary use of t_string as a map key
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jul 8, 2018
1 parent aa1976f commit 19c78fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/help/topic_generators.cpp
Expand Up @@ -263,10 +263,10 @@ topic_list generate_time_of_day_topics(const bool /*sort_generated*/)
topic_list generate_trait_topics(const bool sort_generated)
{
topic_list topics;
std::map<t_string, const config*> trait_list;
std::map<std::string, const config*> trait_list;

for(const config& trait : unit_types.traits()) {
trait_list.emplace(trait["id"].t_str(), &trait);
trait_list.emplace(trait["id"].str(), &trait);
}

for(const auto& i : unit_types.types()) {
Expand All @@ -275,13 +275,13 @@ topic_list generate_trait_topics(const bool sort_generated)
if(description_type(type) == FULL_DESCRIPTION) {
if(auto traits = type.possible_traits()) {
for(const config& trait : traits) {
trait_list.emplace(trait["id"].t_str(), &trait);
trait_list.emplace(trait["id"].str(), &trait);
}
}

if(const unit_race* r = unit_types.find_race(type.race_id())) {
for(const config& trait : r->additional_traits()) {
trait_list.emplace(trait["id"].t_str(), &trait);
trait_list.emplace(trait["id"].str(), &trait);
}
}
}
Expand Down

0 comments on commit 19c78fc

Please sign in to comment.