Cosmetic naming changes

This commit is contained in:
TennesseeTrash 2025-09-19 02:09:53 +02:00
parent bec16e493f
commit acf4d93fde
2 changed files with 12 additions and 12 deletions

View file

@ -139,11 +139,11 @@ namespace CBOR
std::uint64_t ArgumentValue(std::uint8_t header, std::span<std::uint8_t> buffer, std::size_t &current) std::uint64_t ArgumentValue(std::uint8_t header, std::span<std::uint8_t> buffer, std::size_t &current)
{ {
ArgumentPosition pos = GetArgumentPosition(header); ArgumentPosition position = GetArgumentPosition(header);
if (std::to_underlying(pos) <= 23) { if (std::to_underlying(position) <= 23) {
return std::to_underlying(pos); return std::to_underlying(position);
} }
switch (pos) { switch (position) {
case ArgumentPosition::Next1B: case ArgumentPosition::Next1B:
return Consume1B(buffer, current); return Consume1B(buffer, current);
case ArgumentPosition::Next2B: case ArgumentPosition::Next2B:
@ -527,8 +527,8 @@ namespace CBOR
std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent); std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent);
MajorType major = GetMajorType(header); MajorType major = GetMajorType(header);
ArgumentPosition pos = GetArgumentPosition(header); ArgumentPosition position = GetArgumentPosition(header);
if (major != MajorType::Binary || pos == ArgumentPosition::Indefinite){ if (major != MajorType::Binary || position == ArgumentPosition::Indefinite){
throw MalformedDataError("an indefinite length string may only contain " throw MalformedDataError("an indefinite length string may only contain "
"definite length strings"); "definite length strings");
} }
@ -594,8 +594,8 @@ namespace CBOR
std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent); std::uint8_t header = Consume1B(mDecoder->mBuffer, mDecoder->mCurrent);
MajorType major = GetMajorType(header); MajorType major = GetMajorType(header);
ArgumentPosition pos = GetArgumentPosition(header); ArgumentPosition position = GetArgumentPosition(header);
if (major != MajorType::String || pos == ArgumentPosition::Indefinite){ if (major != MajorType::String || position == ArgumentPosition::Indefinite){
throw MalformedDataError("an indefinite length string may only contain " throw MalformedDataError("an indefinite length string may only contain "
"definite length strings"); "definite length strings");
} }