mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 14:48:46 +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());
|
fmt::print("Loading configuration file {}\n", file.path().string());
|
||||||
|
|
||||||
auto loadedConfiguration = std::make_shared<Config::Configuration>(file.path());
|
auto loadedConfiguration = std::make_shared<Config::Configuration>(file.path());
|
||||||
if (!loadedConfiguration)
|
if (!loadedConfiguration) {
|
||||||
{
|
|
||||||
fmt::print("Error loading configuration file ({}).", file.path().string());
|
fmt::print("Error loading configuration file ({}).", file.path().string());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate title id
|
// Validate title id
|
||||||
auto& loadedTitleId = loadedConfiguration->getTitleId();
|
auto& loadedTitleId = loadedConfiguration->getTitleId();
|
||||||
if (loadedTitleId.empty())
|
if (loadedTitleId.empty()) {
|
||||||
{
|
|
||||||
loadedConfiguration.reset();
|
loadedConfiguration.reset();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -46,8 +44,8 @@ void Config::ConfigManager::loadConfigurations() {
|
||||||
|
|
||||||
// If there were no configurations loaded, then create a global one
|
// If there were no configurations loaded, then create a global one
|
||||||
if (!configsLoaded)
|
if (!configsLoaded)
|
||||||
configurations[c_globalTitleId] =
|
configurations[c_globalTitleId] = std::make_shared<Config::Configuration>(
|
||||||
std::make_shared<Config::Configuration>(configs_dir / (c_globalTitleId + c_configExtension));
|
configs_dir / (c_globalTitleId + c_configExtension));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Config::ConfigManager::setCurrentConfigId(std::string titleId) {
|
void Config::ConfigManager::setCurrentConfigId(std::string titleId) {
|
||||||
|
@ -150,21 +148,15 @@ bool Configuration::configVersionDifference(const std::filesystem::path& path) {
|
||||||
auto& defaultFirst = item.first;
|
auto& defaultFirst = item.first;
|
||||||
auto& defaultSecond = item.second;
|
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
|
// Check to see if the old configuration contains the key provided
|
||||||
if (oldConfigData.contains(defaultFirst)) {
|
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
|
// Check to see that the types match for the second
|
||||||
if (oldConfigData[defaultFirst].type() != defaultSecond.type()) {
|
if (oldConfigData[defaultFirst].type() != defaultSecond.type()) {
|
||||||
// std::cout << "mismatch type found!" << std::endl;
|
|
||||||
return true;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,22 +170,12 @@ bool Configuration::configVersionDifference(const std::filesystem::path& path) {
|
||||||
auto& secondItemFirst = tableItemPair.first;
|
auto& secondItemFirst = tableItemPair.first;
|
||||||
auto& secondItemSecond = tableItemPair.second;
|
auto& secondItemSecond = tableItemPair.second;
|
||||||
|
|
||||||
// std::cout << "checking for key (" << secondItemFirst << ") in old config."
|
|
||||||
// << std::endl;
|
|
||||||
|
|
||||||
if (oldConfigSecond.contains(secondItemFirst)) {
|
if (oldConfigSecond.contains(secondItemFirst)) {
|
||||||
// std::cout << "checking (" << secondItemFirst.c_str() << ") type ("
|
|
||||||
// << secondItemSecond.type() << " = "
|
|
||||||
// << oldConfigSecond[secondItemFirst].type() << ")" << std::endl;
|
|
||||||
|
|
||||||
// Check for type match
|
// Check for type match
|
||||||
if (oldConfigSecond[secondItemFirst].type() != secondItemSecond.type()) {
|
if (oldConfigSecond[secondItemFirst].type() != secondItemSecond.type()) {
|
||||||
// std::cout << "mismatch type found!" << std::endl;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// std::cout << "key (" << secondItemFirst << ") is not found in old config."
|
|
||||||
// << std::endl;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,8 +77,8 @@ private:
|
||||||
{"validationGpu", false}, // Breaking change
|
{"validationGpu", false}, // Breaking change
|
||||||
{"rdocEnable", false},
|
{"rdocEnable", false},
|
||||||
{"rdocMarkersEnable", false},
|
{"rdocMarkersEnable", false},
|
||||||
{"debugDump", false}, // Breaking change
|
{"debugDump", false},
|
||||||
{"crashDiagnostic", false},
|
{"crashDiagnostic", false},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue