replace unordered_map with map, less heap

This commit is contained in:
proddy
2026-01-22 16:40:05 +01:00
parent 038f06e59f
commit e0a26a38fa
7 changed files with 14 additions and 14 deletions

View File

@@ -1720,8 +1720,8 @@ void EMSdevice::get_value_json(JsonObject json, DeviceValue & dv) {
// generate Prometheus metrics format from device values
std::string EMSdevice::get_metrics_prometheus(const int8_t tag) {
std::string result;
std::unordered_map<std::string, bool> seen_metrics;
std::string result;
std::map<std::string, bool> seen_metrics;
// Helper function to check if a device value type is supported for Prometheus metrics
auto is_supported_type = [](uint8_t type) -> bool {