mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user