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
@@ -443,7 +443,7 @@ bool Saturn128K::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
}
// "Memory Bankxx"
std::string memName = GetSnapshotMemStructName() + StrFormat("%02X", uBank);
std::string memName = GetSnapshotMemStructName() + ByteToHexStr(uBank);
if (!yamlLoadHelper.GetSubMap(memName))
throw std::runtime_error("Memory: Missing map name: " + memName);