mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 20:14:45 +00:00
Fix linting issues
This commit is contained in:
parent
a89f87409f
commit
1ee3b24c21
2 changed files with 8 additions and 26 deletions
|
@ -26,16 +26,14 @@ void Config::ConfigManager::loadConfigurations() {
|
|||
fmt::print("Loading configuration file {}\n", file.path().string());
|
||||
|
||||
auto loadedConfiguration = std::make_shared<Config::Configuration>(file.path());
|
||||
if (!loadedConfiguration)
|
||||
{
|
||||
if (!loadedConfiguration) {
|
||||
fmt::print("Error loading configuration file ({}).", file.path().string());
|
||||
continue;
|
||||
}
|
||||
|
||||
// Validate title id
|
||||
auto& loadedTitleId = loadedConfiguration->getTitleId();
|
||||
if (loadedTitleId.empty())
|
||||
{
|
||||
if (loadedTitleId.empty()) {
|
||||
loadedConfiguration.reset();
|
||||
continue;
|
||||
}
|
||||
|
@ -46,8 +44,8 @@ void Config::ConfigManager::loadConfigurations() {
|
|||
|
||||
// If there were no configurations loaded, then create a global one
|
||||
if (!configsLoaded)
|
||||
configurations[c_globalTitleId] =
|
||||
std::make_shared<Config::Configuration>(configs_dir / (c_globalTitleId + c_configExtension));
|
||||
configurations[c_globalTitleId] = std::make_shared<Config::Configuration>(
|
||||
configs_dir / (c_globalTitleId + c_configExtension));
|
||||
}
|
||||
|
||||
void Config::ConfigManager::setCurrentConfigId(std::string titleId) {
|
||||
|
@ -150,21 +148,15 @@ bool Configuration::configVersionDifference(const std::filesystem::path& path) {
|
|||
auto& defaultFirst = item.first;
|
||||
auto& defaultSecond = item.second;
|
||||
|
||||
// std::cout << "checking for key (" << defaultFirst << ") in old config." << std::endl;
|
||||
|
||||
// Check to see if the old configuration contains the key provided
|
||||
if (oldConfigData.contains(defaultFirst)) {
|
||||
// std::cout << "checking (" << defaultFirst.c_str() << ") type (" << defaultSecond.type()
|
||||
// << " = " << oldConfigData[defaultFirst].type() << ")" << std::endl;
|
||||
|
||||
// Check to see that the types match for the second
|
||||
if (oldConfigData[defaultFirst].type() != defaultSecond.type()) {
|
||||
// std::cout << "mismatch type found!" << std::endl;
|
||||
return true;
|
||||
}
|
||||
} else // If the key does not exist in the old config but exists in the new, mark difference
|
||||
} else
|
||||
{
|
||||
// std::cout << "key (" << defaultFirst << ") is not found in old config." << std::endl;
|
||||
// If the key does not exist in the old config but exists in the new, mark difference
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -178,22 +170,12 @@ bool Configuration::configVersionDifference(const std::filesystem::path& path) {
|
|||
auto& secondItemFirst = tableItemPair.first;
|
||||
auto& secondItemSecond = tableItemPair.second;
|
||||
|
||||
// std::cout << "checking for key (" << secondItemFirst << ") in old config."
|
||||
// << std::endl;
|
||||
|
||||
if (oldConfigSecond.contains(secondItemFirst)) {
|
||||
// std::cout << "checking (" << secondItemFirst.c_str() << ") type ("
|
||||
// << secondItemSecond.type() << " = "
|
||||
// << oldConfigSecond[secondItemFirst].type() << ")" << std::endl;
|
||||
|
||||
// Check for type match
|
||||
if (oldConfigSecond[secondItemFirst].type() != secondItemSecond.type()) {
|
||||
// std::cout << "mismatch type found!" << std::endl;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// std::cout << "key (" << secondItemFirst << ") is not found in old config."
|
||||
// << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,8 +77,8 @@ private:
|
|||
{"validationGpu", false}, // Breaking change
|
||||
{"rdocEnable", false},
|
||||
{"rdocMarkersEnable", false},
|
||||
{"debugDump", false}, // Breaking change
|
||||
{"crashDiagnostic", false},
|
||||
{"debugDump", false},
|
||||
{"crashDiagnostic", false},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue