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

@ -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();

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)
{
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");
}