Cosmetic naming changes
This commit is contained in:
parent
bec16e493f
commit
acf4d93fde
2 changed files with 12 additions and 12 deletions
|
@ -139,11 +139,11 @@ namespace CBOR
|
||||||
|
|
||||||
std::uint64_t ArgumentValue(std::uint8_t header, std::span<std::uint8_t> buffer, std::size_t ¤t)
|
std::uint64_t ArgumentValue(std::uint8_t header, std::span<std::uint8_t> buffer, std::size_t ¤t)
|
||||||
{
|
{
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue