yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
hex_util.h
Go to the documentation of this file.
1
#ifndef YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
2
#define YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
3
4
#include <cstdint>
5
6
#include "absl/strings/string_view.h"
7
#include "
util/hex.h
"
8
9
namespace
yaze
{
10
namespace
cli {
11
namespace
util {
12
13
// The parser now lives in yaze::util (src/util/hex.h) so core, the editor and
14
// the CLI share one implementation instead of three. These aliases keep the
15
// existing yaze::cli::util::ParseHexString call sites working.
16
//
17
// Behaviour change from the previous strtoul-based version: a value that does
18
// not fit the requested type is always rejected. The old code relied on
19
// `unsigned long`, so on WebAssembly (where it is 32 bits) "-1" wrapped to
20
// 0xFFFFFFFF and passed the range check.
21
using
yaze::util::ParseHexString
;
22
23
}
// namespace util
24
}
// namespace cli
25
}
// namespace yaze
26
27
#endif
// YAZE_SRC_CLI_UTIL_HEX_UTIL_H_
hex.h
yaze::util::ParseHexString
bool ParseHexString(absl::string_view str, uint64_t *out)
Definition
hex.cc:133
yaze
Definition
patch_export_usage.cc:8
src
cli
util
hex_util.h
Generated by
1.10.0