ReservedIdentifiers.hpp: Use std::any_of instead of std::find in the reserved function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
375f10acb3
commit
b6a708dcc0
|
@ -19,7 +19,9 @@ inline const char* ID(const ReservedIdentifier& identifier) {
|
|||
}
|
||||
|
||||
bool reserved(const string_view words) {
|
||||
return find(identifiers.cbegin(), identifiers.cend(), words) != identifiers.cend();
|
||||
return any_of(identifiers.cbegin(), identifiers.cend(), [&words](const auto& identifier) {
|
||||
return words == identifier;
|
||||
});
|
||||
}
|
||||
|
||||
#endif //YERBACON_RESERVEDIDENTIFIERS_HPP
|
||||
|
|
Loading…
Reference in New Issue