Skip to content

Commit

Permalink
rename variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDold committed Sep 8, 2023
1 parent b5fc740 commit 7cd7006
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/search/plugins/raw_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,23 @@ Features RawRegistry::collect_features(
"Missing Plugin for type of feature '" + feature_key + "'.");
}

unordered_map<string, int> argument_key_occurrences;
unordered_map<string, int> parameter_occurrences;
for (const ArgumentInfo &arg_info : feature.get_arguments()) {
if (arg_info.type == TypeRegistry::NO_TYPE) {
errors.push_back(
"Missing Plugin for type of argument '" + arg_info.key
"Missing Plugin for type of parameter '" + arg_info.key
+ "' of feature '" + feature_key + "'.");
}
++argument_key_occurrences[arg_info.key];
++parameter_occurrences[arg_info.key];
}
// Check that arg_keys are unique
for (const auto &pair : argument_key_occurrences) {
const string &arg_key = pair.first;
int arg_key_occurrence = pair.second;
if (arg_key_occurrence > 1) {
// Check that parameters are unique
for (const auto &pair : parameter_occurrences) {
const string &parameter = pair.first;
int parameter_occurrence = pair.second;
if (parameter_occurrence > 1) {
errors.push_back(
"The Argument '" + arg_key + "' in '" + feature_key + "' is defined " +
to_string(arg_key_occurrence) + " times.");
"The Parameter '" + parameter + "' in '" + feature_key + "' is defined " +
to_string(parameter_occurrence) + " times.");
}
}
}
Expand Down

0 comments on commit 7cd7006

Please sign in to comment.