mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-29 11:12:04 -04:00
refactor: use StringToLower from zm_utils.h
Replace inline ASCII lowercase conversion with existing StringToLower utility function for consistency with the rest of the codebase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1090,12 +1090,8 @@ bool ONVIF::interpret_alarm_value(const std::string &value) {
|
||||
return false; // Empty value = no alarm
|
||||
}
|
||||
|
||||
// Convert to lowercase once for case-insensitive comparison (ASCII-only)
|
||||
std::string lower_value;
|
||||
lower_value.reserve(value.size());
|
||||
for (char c : value) {
|
||||
lower_value += (c >= 'A' && c <= 'Z') ? static_cast<char>(c + 32) : c;
|
||||
}
|
||||
// Convert to lowercase once for case-insensitive comparison
|
||||
std::string lower_value = StringToLower(value);
|
||||
|
||||
// Check for explicit false/inactive values
|
||||
if (lower_value == "false" ||
|
||||
|
||||
Reference in New Issue
Block a user