From ffb798f87acc18551adab21004ead41d2134ca73 Mon Sep 17 00:00:00 2001 From: Thomas Debrunner Date: Thu, 14 Mar 2024 10:03:19 +0100 Subject: [PATCH] MessageSet: fixed comments from new enum encoding --- include/mav/MessageSet.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/mav/MessageSet.h b/include/mav/MessageSet.h index 7bdcc48..ff34ebf 100644 --- a/include/mav/MessageSet.h +++ b/include/mav/MessageSet.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "MessageDefinition.h" @@ -104,12 +103,12 @@ namespace mav { static uint64_t _parseEnumValue(const std::string &str) { // Check for binary format: 0b or 0B if (str.size() >= 2 && (str.substr(0, 2) == "0b" || str.substr(0, 2) == "0B")) { - return std::bitset<64>(str.substr(2)).to_ullong(); + return _strict_stoul(str.substr(2), 2); } // Check for hexadecimal format: 0x or 0X if (str.size() >= 2 && (str.substr(0, 2) == "0x" || str.substr(0, 2) == "0X")) { - return _strict_stoul(str, 16); + return _strict_stoul(str.substr(2), 16); } // Check for exponential format: 2**