Browse Source

util: export converter defaults

test/dev
Maxim Prokhorov 1 month ago
parent
commit
fcafafef1c
2 changed files with 3 additions and 6 deletions
  1. +1
    -4
      code/espurna/utils.cpp
  2. +2
    -2
      code/espurna/utils.h

+ 1
- 4
code/espurna/utils.cpp View File

@ -54,10 +54,7 @@ static uint8_t hex_char2byte(char c) {
}
static ParseUnsignedResult parseUnsignedImpl(espurna::StringView value, int base) {
auto out = ParseUnsignedResult{
.ok = false,
.value = 0,
};
ParseUnsignedResult out;
using Char2Byte = uint8_t(*)(char);
Char2Byte char2byte = nullptr;


+ 2
- 2
code/espurna/utils.h View File

@ -26,8 +26,8 @@ bool almostEqual(double lhs, double rhs, int ulp);
bool almostEqual(double lhs, double rhs);
struct ParseUnsignedResult {
bool ok;
uint32_t value;
bool ok { false };
uint32_t value { 0 };
};
ParseUnsignedResult parseUnsigned(espurna::StringView, int base);


Loading…
Cancel
Save