mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
minor std::string optimizations
This commit is contained in:
@@ -369,7 +369,7 @@ std::string DeviceValue::get_fullname() const {
|
||||
return customname;
|
||||
}
|
||||
|
||||
std::string DeviceValue::get_name(std::string & entity) {
|
||||
std::string DeviceValue::get_name(const std::string & entity) {
|
||||
auto pos = entity.find('|');
|
||||
if (pos != std::string::npos) {
|
||||
return entity.substr(2, pos - 2);
|
||||
|
||||
Reference in New Issue
Block a user