patch_manager: Use strings for patch type instead of enum

This commit is contained in:
Zach Hilman
2018-09-29 22:14:01 -04:00
parent 21b2411c44
commit 4c2a94fa94
3 changed files with 36 additions and 33 deletions

View File

@ -60,14 +60,13 @@ QString FormatGameName(const std::string& physical_name) {
QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager, bool updatable = true) {
QString out;
for (const auto& kv : patch_manager.GetPatchVersionNames()) {
if (!updatable && kv.first == FileSys::PatchType::Update)
if (!updatable && kv.first == "Update")
continue;
if (kv.second.empty()) {
out.append(fmt::format("{}\n", FileSys::FormatPatchTypeName(kv.first)).c_str());
out.append(fmt::format("{}\n", kv.first).c_str());
} else {
out.append(fmt::format("{} ({})\n", FileSys::FormatPatchTypeName(kv.first), kv.second)
.c_str());
out.append(fmt::format("{} ({})\n", kv.first, kv.second).c_str());
}
}