diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 54ca1e33a..496c8bb30 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -674,7 +674,6 @@ bool CollectionSystemsManager::toggleGameInCollection(FileData* file) rootFolder->getChildrenByFilename(); bool found = children.find(key) != children.cend(); FileFilterIndex* fileIndex = sysData->getIndex(); - std::string name = sysData->getName(); SystemData* systemViewToUpdate = getSystemToView(sysData); diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index cfc4fe62a..6c977dd0f 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -346,9 +346,9 @@ std::vector FileData::getFilesRecursive(unsigned int typeMask, out.insert(out.cend(), subChildren.cbegin(), subChildren.cend()); } else { - for (auto it = subChildren.cbegin(); it != subChildren.cend(); it++) { - if ((*it)->getCountAsGame()) - out.push_back(*it); + for (auto it2 = subChildren.cbegin(); it2 != subChildren.cend(); it2++) { + if ((*it2)->getCountAsGame()) + out.push_back(*it2); } } } diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 0c10905ee..9c565c0d2 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -392,19 +392,20 @@ bool SystemData::loadConfig() bool onlyProcessCustomFile = false; - for (auto path : configPaths) { + for (auto configPath : configPaths) { // If the loadExclusive tag is present in the custom es_systems.xml file, then skip // processing of the bundled configuration file. if (onlyProcessCustomFile) break; - LOG(LogInfo) << "Parsing systems configuration file \"" << path << "\"..."; + LOG(LogInfo) << "Parsing systems configuration file \"" << configPath << "\"..."; pugi::xml_document doc; #if defined(_WIN64) - pugi::xml_parse_result res = doc.load_file(Utils::String::stringToWideString(path).c_str()); + pugi::xml_parse_result res = + doc.load_file(Utils::String::stringToWideString(configPath).c_str()); #else - pugi::xml_parse_result res = doc.load_file(path.c_str()); + pugi::xml_parse_result res = doc.load_file(configPath.c_str()); #endif if (!res) { @@ -414,7 +415,7 @@ bool SystemData::loadConfig() pugi::xml_node loadExclusive = doc.child("loadExclusive"); if (loadExclusive) { - if (path == configPaths.front() && configPaths.size() > 1) { + if (configPath == configPaths.front() && configPaths.size() > 1) { LOG(LogInfo) << "Only loading custom file as the tag is present"; onlyProcessCustomFile = true; } @@ -1234,21 +1235,21 @@ void SystemData::onMetaDataSavePoint() writeMetaData(); } -void SystemData::setupSystemSortType(FileData* mRootFolder) +void SystemData::setupSystemSortType(FileData* rootFolder) { // If DefaultSortOrder is set to something, check that it is actually a valid value. if (Settings::getInstance()->getString("DefaultSortOrder") != "") { for (unsigned int i = 0; i < FileSorts::SortTypes.size(); i++) { if (FileSorts::SortTypes.at(i).description == Settings::getInstance()->getString("DefaultSortOrder")) { - mRootFolder->setSortTypeString( + rootFolder->setSortTypeString( Settings::getInstance()->getString("DefaultSortOrder")); break; } } } // If no valid sort type was defined in the configuration file, set to default sorting. - if (mRootFolder->getSortTypeString() == "") - mRootFolder->setSortTypeString( + if (rootFolder->getSortTypeString() == "") + rootFolder->setSortTypeString( Settings::getInstance()->getDefaultString("DefaultSortOrder")); } diff --git a/es-app/src/SystemData.h b/es-app/src/SystemData.h index d6bd4de37..381dd4380 100644 --- a/es-app/src/SystemData.h +++ b/es-app/src/SystemData.h @@ -146,7 +146,7 @@ public: void onMetaDataSavePoint(); void writeMetaData(); - void setupSystemSortType(FileData* mRootFolder); + void setupSystemSortType(FileData* rootFolder); private: std::string mName; diff --git a/es-app/src/SystemScreensaver.cpp b/es-app/src/SystemScreensaver.cpp index 8d7fe8c64..846928af1 100644 --- a/es-app/src/SystemScreensaver.cpp +++ b/es-app/src/SystemScreensaver.cpp @@ -440,10 +440,10 @@ void SystemScreensaver::generateImageList() continue; std::vector allFiles = (*it)->getRootFolder()->getFilesRecursive(GAME, true); - for (auto it = allFiles.begin(); it != allFiles.end(); it++) { - std::string imagePath = (*it)->getImagePath(); + for (auto it2 = allFiles.begin(); it2 != allFiles.end(); it2++) { + std::string imagePath = (*it2)->getImagePath(); if (imagePath != "") - mImageFiles.push_back((*it)); + mImageFiles.push_back((*it2)); } } } @@ -457,10 +457,10 @@ void SystemScreensaver::generateVideoList() continue; std::vector allFiles = (*it)->getRootFolder()->getFilesRecursive(GAME, true); - for (auto it = allFiles.begin(); it != allFiles.end(); it++) { - std::string videoPath = (*it)->getVideoPath(); + for (auto it2 = allFiles.begin(); it2 != allFiles.end(); it2++) { + std::string videoPath = (*it2)->getVideoPath(); if (videoPath != "") - mVideoFiles.push_back((*it)); + mVideoFiles.push_back((*it2)); } } } diff --git a/es-app/src/guis/GuiGamelistFilter.cpp b/es-app/src/guis/GuiGamelistFilter.cpp index b861cf179..ee6746ef0 100644 --- a/es-app/src/guis/GuiGamelistFilter.cpp +++ b/es-app/src/guis/GuiGamelistFilter.cpp @@ -147,9 +147,6 @@ void GuiGamelistFilter::addFiltersToMenu() std::string menuLabel = (*it).menuLabel; // Text to show in menu. std::shared_ptr> optionList; - // Add filters (with first one selected). - ComponentListRow row; - // Add genres. optionList = std::make_shared>(mWindow, getHelpStyle(), menuLabel, true); diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index d8a6b6716..d908499fd 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -95,13 +95,13 @@ void NinePatchComponent::buildVertices() const glm::vec2 imgPos{imgPosX[sliceX], imgPosY[sliceY]}; const glm::vec2 imgSize{imgSizeX[sliceX], imgSizeY[sliceY]}; const glm::vec2 texPos{texPosX[sliceX], texPosY[sliceY]}; - const glm::vec2 texSize{texSizeX[sliceX], texSizeY[sliceY]}; + const glm::vec2 texSizeSlice{texSizeX[sliceX], texSizeY[sliceY]}; // clang-format off - mVertices[v + 1] = {{imgPos.x , imgPos.y }, {texPos.x, texPos.y }, 0}; - mVertices[v + 2] = {{imgPos.x , imgPos.y + imgSize.y}, {texPos.x, texPos.y + texSize.y}, 0}; - mVertices[v + 3] = {{imgPos.x + imgSize.x, imgPos.y }, {texPos.x + texSize.x, texPos.y }, 0}; - mVertices[v + 4] = {{imgPos.x + imgSize.x, imgPos.y + imgSize.y}, {texPos.x + texSize.x, texPos.y + texSize.y}, 0}; + mVertices[v + 1] = {{imgPos.x , imgPos.y }, {texPos.x, texPos.y }, 0}; + mVertices[v + 2] = {{imgPos.x , imgPos.y + imgSize.y}, {texPos.x, texPos.y + texSizeSlice.y}, 0}; + mVertices[v + 3] = {{imgPos.x + imgSize.x, imgPos.y }, {texPos.x + texSizeSlice.x, texPos.y }, 0}; + mVertices[v + 4] = {{imgPos.x + imgSize.x, imgPos.y + imgSize.y}, {texPos.x + texSizeSlice.x, texPos.y + texSizeSlice.y}, 0}; // clang-format on // Round vertices. diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index b33ec6bd9..1af73a9e5 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -62,7 +62,11 @@ public: ALIGN_RIGHT }; - void setAlignment(Alignment align) { mAlignment = align; } + void setAlignment(Alignment align) + { + // Set alignment. + mAlignment = align; + } void setCursorChangedCallback(const std::function& func) {