This commit is contained in:
deeaitch committed 2026-10-07 18:50:11 -04:00
1 parent a0938cb29c
commit 3dd9230fca
21 files changed
+491 -450

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ using RawSignalValue = std::variant<std::int64_t, std::uint64_t>;
/** Canonical keys: negative int64_t, nonnegative uint64_t. */
inline RawSignalValue NormalizeValueKey(const RawSignalValue &value) {
if (const auto *number = std::get_if<std::int64_t>(&value)) {
if (const std::int64_t *number = std::get_if<std::int64_t>(&value)) {
if (*number >= 0)
return static_cast<std::uint64_t>(*number);
}
@@ -23,7 +23,7 @@ using ValueDescriptions = std::map<RawSignalValue, std::string>;
/** Returns a borrowed string, or nullptr; never converts integers to double. */
inline const std::string *FindValueDescription(const ValueDescriptions &descriptions,
const RawSignalValue &rawValue) {
const auto found = descriptions.find(NormalizeValueKey(rawValue));
const ValueDescriptions::const_iterator found = descriptions.find(NormalizeValueKey(rawValue));
return found == descriptions.end() ? nullptr : &found->second;
}