| 42 | namespace |
| 43 | { |
| 44 | bool readByte(Uuid::Bytes::iterator& outputIt, |
| 45 | std::string::const_iterator& inputIt, |
| 46 | const std::string::const_iterator& inputEnd) |
| 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 | } |
| 70 | } // namespace |
| 71 | |
| 72 | Uuid::Uuid() |
no test coverage detected