Use .contains() instead of .find() or .count()

This commit is contained in:
Tim Wojtulewicz 2025-07-23 16:34:44 -07:00
parent d20550f553
commit b592b6c998
68 changed files with 201 additions and 207 deletions

View file

@ -148,7 +148,7 @@ bool DebugLogger::CheckStreams(const std::set<std::string>& plugin_names) {
if ( ! stream.starts_with("plugin-") )
continue;
if ( available_plugin_streams.count(stream) == 0 ) {
if ( ! available_plugin_streams.contains(stream) ) {
reporter->Error("No plugin debug stream '%s' found", stream.c_str());
ok = false;
}
@ -180,7 +180,7 @@ void DebugLogger::Log(DebugStream stream, const char* fmt, ...) {
void DebugLogger::Log(const plugin::Plugin& plugin, const char* fmt, ...) {
if ( ! all ) {
std::string tok = PluginStreamName(plugin.Name());
if ( enabled_streams.find(tok) == enabled_streams.end() )
if ( ! enabled_streams.contains(tok) )
return;
}