mirror of
https://github.com/gbdev/rgbds.git
synced 2026-07-02 14:08:04 +00:00
Use templates to reduce the redundant number-lexing functions (#1963)
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "diagnostics.hpp"
|
||||
#include "helpers.hpp"
|
||||
#include "platform.hpp"
|
||||
#include "util.hpp" // UpperMap, isDigit
|
||||
#include "util.hpp" // UpperMap, parseDigit
|
||||
|
||||
#include "gfx/main.hpp"
|
||||
#include "gfx/png.hpp"
|
||||
@@ -37,7 +37,7 @@ static void skipBlankSpace(std::string_view const &str, size_t &pos) {
|
||||
}
|
||||
|
||||
static uint8_t toHex(char c1, char c2) {
|
||||
return parseHexDigit(c1) * 16 + parseHexDigit(c2);
|
||||
return parseDigit<16>(c1) * 16 + parseDigit<16>(c2);
|
||||
}
|
||||
|
||||
static uint8_t singleToHex(char c) {
|
||||
|
||||
Reference in New Issue
Block a user