mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Merge pull request #133 from pjft/RetroPie-master-filter-rebase
Fixing whitespaces and indentation (tabs)
This commit is contained in:
commit
7d43c87757
|
@ -149,7 +149,8 @@ void FileFilterIndex::setFilter(FilterIndexType type, std::vector<std::string>*
|
|||
|
||||
void FileFilterIndex::clearAllFilters()
|
||||
{
|
||||
for (std::vector<FilterDataDecl>::iterator it = filterDataDecl.begin(); it != filterDataDecl.end(); ++it ) {
|
||||
for (std::vector<FilterDataDecl>::iterator it = filterDataDecl.begin(); it != filterDataDecl.end(); ++it )
|
||||
{
|
||||
FilterDataDecl filterData = (*it);
|
||||
*(filterData.filteredByRef) = false;
|
||||
filterData.currentFilteredKeys->clear();
|
||||
|
@ -199,13 +200,15 @@ bool FileFilterIndex::showFile(FileData* game)
|
|||
|
||||
for (std::vector<FilterDataDecl>::iterator it = filterDataDecl.begin(); it != filterDataDecl.end(); ++it ) {
|
||||
FilterDataDecl filterData = (*it);
|
||||
if(*(filterData.filteredByRef)) {
|
||||
if(*(filterData.filteredByRef))
|
||||
{
|
||||
// try to find a match
|
||||
std::string key = getIndexableKey(game, filterData.type, false);
|
||||
keepGoing = isKeyBeingFilteredBy(key, filterData.type);
|
||||
|
||||
// if we didn't find a match, try for secondary keys - i.e. publisher and dev, or first genre
|
||||
if (!keepGoing) {
|
||||
if (!keepGoing)
|
||||
{
|
||||
if (!filterData.hasSecondaryKey)
|
||||
{
|
||||
return false;
|
||||
|
@ -227,13 +230,17 @@ bool FileFilterIndex::showFile(FileData* game)
|
|||
return keepGoing;
|
||||
}
|
||||
|
||||
bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type) {
|
||||
bool FileFilterIndex::isKeyBeingFilteredBy(std::string key, FilterIndexType type)
|
||||
{
|
||||
const FilterIndexType filterTypes[4] = { PLAYER_FILTER, RATINGS_FILTER, GENRE_FILTER, PUBDEV_FILTER };
|
||||
std::vector<std::string> filterKeysList[4] = { playersIndexFilteredKeys, ratingsIndexFilteredKeys, genreIndexFilteredKeys, pubDevIndexFilteredKeys };
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (filterTypes[i] == type) {
|
||||
for (std::vector<std::string>::iterator it = filterKeysList[i].begin(); it != filterKeysList[i].end(); ++it ) {
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (filterTypes[i] == type)
|
||||
{
|
||||
for (std::vector<std::string>::iterator it = filterKeysList[i].begin(); it != filterKeysList[i].end(); ++it )
|
||||
{
|
||||
if (key == (*it))
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue