From 40a935fb0649bc5997a74a4b086285c19605b559 Mon Sep 17 00:00:00 2001 From: "Aubry, Kyllian" Date: Mon, 13 May 2024 14:20:01 +0200 Subject: [PATCH] SKA-403: fix advalues check regression --- advalues/adapter/AdAdapter.cpp | 6 +++--- advalues/adapter/AdAdapter.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/advalues/adapter/AdAdapter.cpp b/advalues/adapter/AdAdapter.cpp index f549916..54d34ee 100644 --- a/advalues/adapter/AdAdapter.cpp +++ b/advalues/adapter/AdAdapter.cpp @@ -62,7 +62,7 @@ auto AdAdapter::Serialize() -> std::vector } case enum_uint8_t: { - uint8_t value = isValidData(str); + uint8_t value = isValidData(str); serializer.Serialize(bufferFromChardevTo(), 8); break; } @@ -133,14 +133,14 @@ void AdAdapter::Deserialize(const std::vector& bytes) case enum_uint8_t: { std::stringstream ss; - ss << static_cast(deserializer.Deserialize(8)); + ss << static_cast(deserializer.Deserialize(8)); str = ss.str(); break; } case enum_int8_t: { std::stringstream ss; - ss << static_cast(deserializer.Deserialize(8)); + ss << static_cast(deserializer.Deserialize(8)); str = ss.str(); break; } diff --git a/advalues/adapter/AdAdapter.hpp b/advalues/adapter/AdAdapter.hpp index 5d00018..a632e36 100644 --- a/advalues/adapter/AdAdapter.hpp +++ b/advalues/adapter/AdAdapter.hpp @@ -128,7 +128,7 @@ auto AdAdapter::isValidData(const std::string& str) -> T } else if (std::is_unsigned_v) { - if (!isHexa) + if (isHexa) { value = std::stoull(str, nullptr, 0); }