Audacity 3.2.0
Functions
audacity::anonymous_namespace{Uuid.cpp} Namespace Reference

Functions

bool readByte (Uuid::Bytes::iterator &outputIt, std::string::const_iterator &inputIt, const std::string::const_iterator &inputEnd)
 

Function Documentation

◆ readByte()

bool audacity::anonymous_namespace{Uuid.cpp}::readByte ( Uuid::Bytes::iterator &  outputIt,
std::string::const_iterator &  inputIt,
const std::string::const_iterator &  inputEnd 
)

Definition at line 44 of file Uuid.cpp.

47{
48 if (inputIt == inputEnd)
49 return false;
50
51 const char c1 = *inputIt++;
52
53 if (!std::isxdigit(c1))
54 return false;
55
56 if (inputIt == inputEnd)
57 return false;
58
59 const char c2 = *inputIt++;
60
61 if (!std::isxdigit(c2))
62 return false;
63
64 *outputIt = static_cast<uint8_t>((HexCharToNum(c1) << 4) | HexCharToNum(c2));
65
66 ++outputIt;
67
68 return true;
69}
uint8_t HexCharToNum(char c) noexcept
Definition: HexHelpers.h:20

References audacity::HexCharToNum().

Referenced by audacity::Uuid::FromString().

Here is the call graph for this function:
Here is the caller graph for this function: