From acf4d93fded24b558946cf226aedc32ce6709fde Mon Sep 17 00:00:00 2001 From: TennesseeTrash Date: Fri, 19 Sep 2025 02:09:53 +0200 Subject: [PATCH] Cosmetic naming changes --- LibCBOR/Include/CBOR/Decoder.hpp | 8 ++++---- LibCBOR/Source/Decoder.cpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/LibCBOR/Include/CBOR/Decoder.hpp b/LibCBOR/Include/CBOR/Decoder.hpp index 52a71a6..b552054 100644 --- a/LibCBOR/Include/CBOR/Decoder.hpp +++ b/LibCBOR/Include/CBOR/Decoder.hpp @@ -160,10 +160,10 @@ namespace CBOR bool Bool(); Special Special(); - std::int8_t Int8(); - std::int16_t Int16(); - std::int32_t Int32(); - std::int64_t Int64(); + std::int8_t Int8(); + std::int16_t Int16(); + std::int32_t Int32(); + std::int64_t Int64(); std::uint8_t Uint8(); std::uint16_t Uint16(); diff --git a/LibCBOR/Source/Decoder.cpp b/LibCBOR/Source/Decoder.cpp index 1072b46..8cb2ca3 100644 --- a/LibCBOR/Source/Decoder.cpp +++ b/LibCBOR/Source/Decoder.cpp @@ -139,11 +139,11 @@ namespace CBOR std::uint64_t ArgumentValue(std::uint8_t header, std::span buffer, std::size_t ¤t) { - ArgumentPosition pos = GetArgumentPosition(header); - if (std::to_underlying(pos) <= 23) { - return std::to_underlying(pos); + ArgumentPosition position = GetArgumentPosition(header); + if (std::to_underlying(position) <= 23) { + return std::to_underlying(position); } - switch (pos) { + switch (position) { case ArgumentPosition::Next1B: return Consume1B(buffer, current); case ArgumentPosition::Next2B: @@ -527,8 +527,8 @@ namespace CBOR std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent); MajorType major = GetMajorType(header); - ArgumentPosition pos = GetArgumentPosition(header); - if (major != MajorType::Binary || pos == ArgumentPosition::Indefinite){ + ArgumentPosition position = GetArgumentPosition(header); + if (major != MajorType::Binary || position == ArgumentPosition::Indefinite){ throw MalformedDataError("an indefinite length string may only contain " "definite length strings"); } @@ -594,8 +594,8 @@ namespace CBOR std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent); MajorType major = GetMajorType(header); - ArgumentPosition pos = GetArgumentPosition(header); - if (major != MajorType::String || pos == ArgumentPosition::Indefinite){ + ArgumentPosition position = GetArgumentPosition(header); + if (major != MajorType::String || position == ArgumentPosition::Indefinite){ throw MalformedDataError("an indefinite length string may only contain " "definite length strings"); }