Some code format changes made by clang-format 18

This commit is contained in:
Leon Styhre 2024-10-06 22:36:22 +02:00
parent 3dcc7be790
commit 9bc20fb18a
6 changed files with 18 additions and 26 deletions

View file

@ -299,10 +299,10 @@ namespace GamelistFileParser
// application restart. // application restart.
if (!Settings::getInstance()->getBool("ShowHiddenGames")) { if (!Settings::getInstance()->getBool("ShowHiddenGames")) {
if (file->getHidden()) { if (file->getHidden()) {
LOG(LogDebug) << "GamelistFileParser::parseGamelist(): Skipping hidden " LOG(LogDebug)
<< (type == GAME ? "file" : "folder") << " entry \"" << "GamelistFileParser::parseGamelist(): Skipping hidden "
<< file->getName() << "\"" << (type == GAME ? "file" : "folder") << " entry \"" << file->getName()
<< " (\"" << file->getPath() << "\")"; << "\"" << " (\"" << file->getPath() << "\")";
FileData* parent {file->getParent()}; FileData* parent {file->getParent()};
delete file; delete file;
// In case there are no entries left in the folder. // In case there are no entries left in the folder.

View file

@ -898,8 +898,7 @@ std::string MiximageGenerator::getSavePath() const
#if defined(__ANDROID__) #if defined(__ANDROID__)
if (!Utils::FileSystem::exists(path + ".nomedia")) { if (!Utils::FileSystem::exists(path + ".nomedia")) {
LOG(LogInfo) << "Creating \"no media\" file \"" << path + ".nomedia" LOG(LogInfo) << "Creating \"no media\" file \"" << path + ".nomedia" << "\"...";
<< "\"...";
Utils::FileSystem::createEmptyFile(path + ".nomedia"); Utils::FileSystem::createEmptyFile(path + ".nomedia");
if (!Utils::FileSystem::exists(path + ".nomedia")) { if (!Utils::FileSystem::exists(path + ".nomedia")) {
LOG(LogWarning) << "Couldn't create file, permission problems?"; LOG(LogWarning) << "Couldn't create file, permission problems?";

View file

@ -156,9 +156,8 @@ bool PDFViewer::startPDFViewer(FileData* game)
#if (DEBUG_PDF_CONVERSION) #if (DEBUG_PDF_CONVERSION)
LOG(LogDebug) << "Page " << i << ": Orientation: " << mPages[i].orientation << " / " LOG(LogDebug) << "Page " << i << ": Orientation: " << mPages[i].orientation << " / "
<< "crop box width: " << width << " / " << "crop box width: " << width << " / " << "crop box height: " << height
<< "crop box height: " << height << " / " << " / " << "size ratio: " << width / height << " / "
<< "size ratio: " << width / height << " / "
<< "texture size: " << mPages[i].width << "x" << mPages[i].height; << "texture size: " << mPages[i].width << "x" << mPages[i].height;
#endif #endif
} }

View file

@ -873,8 +873,7 @@ int main(int argc, char* argv[])
} }
} }
if (!Utils::FileSystem::exists(themeDir + "/.nomedia")) { if (!Utils::FileSystem::exists(themeDir + "/.nomedia")) {
LOG(LogInfo) << "Creating \"no media\" file \"" << themeDir + "/.nomedia" LOG(LogInfo) << "Creating \"no media\" file \"" << themeDir + "/.nomedia" << "\"...";
<< "\"...";
Utils::FileSystem::createEmptyFile(themeDir + "/.nomedia"); Utils::FileSystem::createEmptyFile(themeDir + "/.nomedia");
if (!Utils::FileSystem::exists(themeDir + "/.nomedia")) { if (!Utils::FileSystem::exists(themeDir + "/.nomedia")) {
LOG(LogWarning) << "Couldn't create file, permission problems?"; LOG(LogWarning) << "Couldn't create file, permission problems?";
@ -1174,8 +1173,7 @@ int main(int argc, char* argv[])
#if defined(__ANDROID__) #if defined(__ANDROID__)
if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) { if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) {
LOG(LogInfo) << "Creating \"no media\" file \"" LOG(LogInfo) << "Creating \"no media\" file \""
<< FileData::getROMDirectory() + ".nomedia" << FileData::getROMDirectory() + ".nomedia" << "\"...";
<< "\"...";
Utils::FileSystem::createEmptyFile(FileData::getROMDirectory() + ".nomedia"); Utils::FileSystem::createEmptyFile(FileData::getROMDirectory() + ".nomedia");
if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) { if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) {
LOG(LogWarning) << "Couldn't create file, permission problems?"; LOG(LogWarning) << "Couldn't create file, permission problems?";

View file

@ -726,8 +726,7 @@ std::string getSaveAsPath(const ScraperSearchParams& params,
#if defined(__ANDROID__) #if defined(__ANDROID__)
if (!Utils::FileSystem::exists(path + ".nomedia")) { if (!Utils::FileSystem::exists(path + ".nomedia")) {
LOG(LogInfo) << "Creating \"no media\" file \"" << path + ".nomedia" LOG(LogInfo) << "Creating \"no media\" file \"" << path + ".nomedia" << "\"...";
<< "\"...";
Utils::FileSystem::createEmptyFile(path + ".nomedia"); Utils::FileSystem::createEmptyFile(path + ".nomedia");
if (!Utils::FileSystem::exists(path + ".nomedia")) { if (!Utils::FileSystem::exists(path + ".nomedia")) {
LOG(LogWarning) << "Couldn't create file, permission problems?"; LOG(LogWarning) << "Couldn't create file, permission problems?";

View file

@ -177,21 +177,18 @@ void ViewController::setMenuColors()
void ViewController::legacyAppDataDialog() void ViewController::legacyAppDataDialog()
{ {
const std::string upgradeMessage const std::string upgradeMessage {
{
"AS OF ES-DE 3.0 THE APPLICATION DATA DIRECTORY HAS CHANGED FROM \".emulationstation\" " "AS OF ES-DE 3.0 THE APPLICATION DATA DIRECTORY HAS CHANGED FROM \".emulationstation\" "
"to \"ES-DE\"\nPLEASE RENAME YOUR CURRENT DATA DIRECTORY:\n" + "to \"ES-DE\"\nPLEASE RENAME YOUR CURRENT DATA DIRECTORY:\n" +
#if defined(_WIN64) #if defined(_WIN64)
Utils::String::replace(Utils::FileSystem::getAppDataDirectory(), "/", "\\") + Utils::String::replace(Utils::FileSystem::getAppDataDirectory(), "/", "\\") +
"\nTO THE FOLLOWING:\n" + "\nTO THE FOLLOWING:\n" +
Utils::String::replace( Utils::String::replace(
Utils::FileSystem::getParent(Utils::FileSystem::getAppDataDirectory()), "/", "\\") + Utils::FileSystem::getParent(Utils::FileSystem::getAppDataDirectory()), "/", "\\") +
"\\ES-DE" "\\ES-DE"};
};
#else #else
Utils::FileSystem::getAppDataDirectory() + "\nTO THE FOLLOWING:\n" + Utils::FileSystem::getAppDataDirectory() + "\nTO THE FOLLOWING:\n" +
Utils::FileSystem::getParent(Utils::FileSystem::getAppDataDirectory()) + "/ES-DE" Utils::FileSystem::getParent(Utils::FileSystem::getAppDataDirectory()) + "/ES-DE"};
};
#endif #endif
mWindow->pushGui(new GuiMsgBox( mWindow->pushGui(new GuiMsgBox(