Add ByteToHexStr() and WordToHexStr() (PR #1064)

- Simplify common StrFormat(), especially in Debugger (changes upcoming)
- Add helpers StrAppendByteAsHex() and StrAppendWordAsHex()
- Add helpers StrBufferAppendByteAsHex() and StrBufferAppendWordAsHex() for plain string buffer
This commit is contained in:
Kelvin Lee
2022-03-23 06:19:50 +11:00
committed by GitHub
parent 119db28de1
commit 2d4f60452f
4 changed files with 56 additions and 6 deletions
+1 -1
View File
@@ -2443,7 +2443,7 @@ static void MemLoadSnapshotAuxCommon(YamlLoadHelper& yamlLoadHelper, const std::
}
// "Auxiliary Memory Bankxx"
std::string auxMemName = MemGetSnapshotAuxMemStructName() + StrFormat("%02X", uBank-1);
std::string auxMemName = MemGetSnapshotAuxMemStructName() + ByteToHexStr(uBank-1);
if (!yamlLoadHelper.GetSubMap(auxMemName))
throw std::runtime_error("Memory: Missing map name: " + auxMemName);