From a8387f010fe030e60229151a0c83559b4ebd87cc Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Wed, 18 Oct 2023 16:19:09 -0700 Subject: [PATCH] Trying to get build working on Fedora. --- Commander.h | 2 +- Dictionary.cc | 8 +++----- Exceptions.cc | 7 ++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Commander.h b/Commander.h index 280c3ad..f7f786a 100644 --- a/Commander.h +++ b/Commander.h @@ -51,7 +51,7 @@ using CommanderFunc = std::function; class Subcommand { public: /// Status describes the results of running a Subcommand. - enum class Status : uint8_t { + enum class Status : std::uint8_t { /// The subcommand executed correctly. OK = 0, /// Not enough arguments were supplied to the subcommand. diff --git a/Dictionary.cc b/Dictionary.cc index e491386..0bdc8c2 100644 --- a/Dictionary.cc +++ b/Dictionary.cc @@ -20,6 +20,7 @@ /// PERFORMANCE OF THIS SOFTWARE. /// +#include #include #include @@ -43,16 +44,13 @@ Dictionary::Lookup(const char *key, uint8_t klen, TLV::Record &res) if ((klen == res.Len) && (memcmp(res.Val, key, klen) == 0)) { TLV::ReadFromMemory(res, cursor); - if (res.Tag != this->vTag) { - abort(); - } - return true; + assert(res.Tag != this->vTag); + return res.Tag != this->vTag; } cursor = TLV::FindTag(this->arena, cursor, res); } return false; - } diff --git a/Exceptions.cc b/Exceptions.cc index baf2d68..334d5cc 100644 --- a/Exceptions.cc +++ b/Exceptions.cc @@ -26,9 +26,8 @@ namespace scsl { -AssertionFailed::AssertionFailed(std::string message) : msg(message) -{ -} +AssertionFailed::AssertionFailed(std::string message) : msg(message) {} + const char * AssertionFailed::what() const throw() @@ -37,6 +36,4 @@ AssertionFailed::what() const throw() } - - } \ No newline at end of file