mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
PatchEngine: Make PatchType an enum class
Makes the enum strongly typed. A function for retrieving the string representation of the enum is also added, which allows hiding the array that contains all of the strings from view (i.e. we operate on the API, not the exposed internals). This also allows us to bounds check any querying for the strings.
This commit is contained in:
parent
a166cf2481
commit
0995cfef6a
6 changed files with 53 additions and 40 deletions
|
@ -755,9 +755,10 @@ void CISOProperties::PatchList_Save()
|
|||
lines.push_back("$" + p.name);
|
||||
for (const PatchEngine::PatchEntry& entry : p.entries)
|
||||
{
|
||||
std::string temp = StringFromFormat("0x%08X:%s:0x%08X", entry.address,
|
||||
PatchEngine::PatchTypeStrings[entry.type], entry.value);
|
||||
lines.push_back(temp);
|
||||
std::string temp =
|
||||
StringFromFormat("0x%08X:%s:0x%08X", entry.address,
|
||||
PatchEngine::PatchTypeAsString(entry.type), entry.value);
|
||||
lines.push_back(std::move(temp));
|
||||
}
|
||||
}
|
||||
++index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue