mirror of https://github.com/PCSX2/pcsx2.git
Use consistent snake_case naming & don't pass string_view by ref
Addresses feedback to use consistent naming conventions as most variables are using snake_case. Also no longer passes string_view by reference as per feedback.
This commit is contained in:
parent
57465b2892
commit
45758add5d
|
@ -88,12 +88,12 @@ void GamePatchSettingsWidget::onReloadClicked()
|
|||
void GamePatchSettingsWidget::reloadList()
|
||||
{
|
||||
// Patches shouldn't have any unlabelled patch groups, because they're new.
|
||||
u32 numberOfUnlabeledPatches = 0;
|
||||
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, &numberOfUnlabeledPatches);
|
||||
u32 number_of_unlabeled_patches = 0;
|
||||
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, &number_of_unlabeled_patches);
|
||||
std::vector<std::string> enabled_list =
|
||||
m_dialog->getSettingsInterface()->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
|
||||
|
||||
setUnlabeledPatchesWarningVisibility(numberOfUnlabeledPatches > 0);
|
||||
setUnlabeledPatchesWarningVisibility(number_of_unlabeled_patches > 0);
|
||||
delete m_ui.scrollArea->takeWidget();
|
||||
|
||||
QWidget* container = new QWidget(m_ui.scrollArea);
|
||||
|
|
|
@ -158,8 +158,8 @@ namespace Patch
|
|||
static std::vector<std::string> FindPatchFilesOnDisk(
|
||||
const std::string_view& serial, u32 crc, bool cheats, bool all_crcs);
|
||||
|
||||
static bool ContainsPatchName(const PatchInfoList& patches, const std::string_view& patchName);
|
||||
static bool ContainsPatchName(const PatchList& patches, const std::string_view& patchName);
|
||||
static bool ContainsPatchName(const PatchInfoList& patches, const std::string_view patchName);
|
||||
static bool ContainsPatchName(const PatchList& patches, const std::string_view patchName);
|
||||
|
||||
template <typename F>
|
||||
static void EnumeratePnachFiles(const std::string_view& serial, u32 crc, bool cheats, bool for_ui, const F& f);
|
||||
|
@ -219,11 +219,11 @@ void Patch::TrimPatchLine(std::string& buffer)
|
|||
buffer.erase(pos);
|
||||
}
|
||||
|
||||
bool Patch::ContainsPatchName(const PatchList& patchList, const std::string_view& patchName)
|
||||
bool Patch::ContainsPatchName(const PatchList& patch_list, const std::string_view patch_name)
|
||||
{
|
||||
return std::find_if(patchList.begin(), patchList.end(), [&patchName](const PatchGroup& patch) {
|
||||
return patch.name == patchName;
|
||||
}) != patchList.end();
|
||||
return std::find_if(patch_list.begin(), patch_list.end(), [&patch_name](const PatchGroup& patch) {
|
||||
return patch.name == patch_name;
|
||||
}) != patch_list.end();
|
||||
}
|
||||
|
||||
int Patch::PatchTableExecute(PatchGroup* group, const std::string_view& lhs, const std::string_view& rhs,
|
||||
|
@ -369,7 +369,7 @@ std::vector<std::string> Patch::FindPatchFilesOnDisk(const std::string_view& ser
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool Patch::ContainsPatchName(const PatchInfoList& patches, const std::string_view& patchName)
|
||||
bool Patch::ContainsPatchName(const PatchInfoList& patches, const std::string_view patchName)
|
||||
{
|
||||
return std::find_if(patches.begin(), patches.end(), [&patchName](const PatchInfo& patch) {
|
||||
return patch.name == patchName;
|
||||
|
|
Loading…
Reference in New Issue