Skip to content

Commit

Permalink
Review changes: use find instead of two accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
FifthPotato committed Jan 23, 2024
1 parent 52e5b3b commit fa1d4ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace
return boost::starts_with(_object_name, prefix.get_ref<const std::string&>());
});
if (prefix_matched) {
if (config->count("admin_only") && config->at("admin_only").get<bool>()) {
if (config->find("admin_only")->get<bool>()) {
return user_is_administrator(*rei.rsComm);
}

Expand Down

0 comments on commit fa1d4ab

Please sign in to comment.