Skip to content

Commit

Permalink
Merge pull request #119 from friskluft/POL3115_faster_feature_name_to…
Browse files Browse the repository at this point in the history
…_code

POL3115-faster-feature-name-to-code
  • Loading branch information
hsidky authored May 26, 2023
2 parents 779a6e2 + 8f495f7 commit 9a8df7b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/nyx/featureset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,14 @@ FeatureSet::FeatureSet()
enableAll(true);
}

bool FeatureSet::findFeatureByString(const std::string& featureName, AvailableFeatures& f)
bool FeatureSet::findFeatureByString (const std::string& featureName, AvailableFeatures& f)
{
if (Nyxus::UserFacingFeatureNames.find(featureName) == Nyxus::UserFacingFeatureNames.end())
auto it_f = Nyxus::UserFacingFeatureNames.find (featureName);

if (it_f == Nyxus::UserFacingFeatureNames.end())
return false;

f = Nyxus::UserFacingFeatureNames[featureName];
f = it_f->second;
return true;
}

Expand Down

0 comments on commit 9a8df7b

Please sign in to comment.