PerformScan: Only hash if we're not debugging in getRecordName()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I1913d586527afbc44adf03d7d4764affb15a3e91
diff --git a/src/PerformScan.cpp b/src/PerformScan.cpp
index c7d0a8f..f36ab16 100644
--- a/src/PerformScan.cpp
+++ b/src/PerformScan.cpp
@@ -222,7 +222,7 @@
std::visit([&device](auto&& v) { device.push_back(v); },
devPair.second);
}
- size_t hash = std::hash<std::string>{}(probeName + device.dump());
+
// hashes are hard to distinguish, use the non-hashed version if we want
// debug
if constexpr (debug)
@@ -230,7 +230,7 @@
return probeName + device.dump();
}
- return std::to_string(hash);
+ return std::to_string(std::hash<std::string>{}(probeName + device.dump()));
}
PerformScan::PerformScan(nlohmann::json& systemConfiguration,