Use const in for loop
This commit is contained in:
@@ -1735,7 +1735,7 @@ text_sensor:
|
||||
|
||||
std::string result;
|
||||
bool last_was_underscore = false;
|
||||
for (char& c : raw_name) {
|
||||
for (const char& c : raw_name) {
|
||||
if (isalnum(c)) {
|
||||
result += tolower(c); // Add alphanumeric characters as lowercase
|
||||
last_was_underscore = false;
|
||||
|
||||
Reference in New Issue
Block a user