mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Removed some unnecessary functions in SystemData.
This commit is contained in:
parent
2d284fda6c
commit
d414c3b845
|
@ -981,15 +981,6 @@ bool SystemData::createSystemDirectories()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool SystemData::isVisible() const
|
|
||||||
{
|
|
||||||
// This function doesn't make much sense at the moment; if a system does not have any
|
|
||||||
// games available, it will not be processed during startup and will as such not exist.
|
|
||||||
// In the future this function may be used for an option to hide specific systems, but
|
|
||||||
// for the time being all systems will always be visible.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
SystemData* SystemData::getSystemByName(const std::string& systemName)
|
SystemData* SystemData::getSystemByName(const std::string& systemName)
|
||||||
{
|
{
|
||||||
for (auto it : sSystemVector) {
|
for (auto it : sSystemVector) {
|
||||||
|
@ -1002,30 +993,22 @@ SystemData* SystemData::getSystemByName(const std::string& systemName)
|
||||||
|
|
||||||
SystemData* SystemData::getNext() const
|
SystemData* SystemData::getNext() const
|
||||||
{
|
{
|
||||||
std::vector<SystemData*>::const_iterator it = getIterator();
|
auto it = std::find(sSystemVector.cbegin(), sSystemVector.cend(), this);
|
||||||
|
|
||||||
// As we are starting in a valid gamelistview, this will
|
|
||||||
// always succeed, even if we have to come full circle.
|
|
||||||
do {
|
|
||||||
++it;
|
++it;
|
||||||
if (it == sSystemVector.cend())
|
if (it == sSystemVector.cend())
|
||||||
it = sSystemVector.cbegin();
|
it = sSystemVector.cbegin();
|
||||||
} while (!(*it)->isVisible());
|
|
||||||
|
|
||||||
return *it;
|
return *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemData* SystemData::getPrev() const
|
SystemData* SystemData::getPrev() const
|
||||||
{
|
{
|
||||||
std::vector<SystemData*>::const_reverse_iterator it = getRevIterator();
|
auto it = std::find(sSystemVector.crbegin(), sSystemVector.crend(), this);
|
||||||
|
|
||||||
// As we are starting in a valid gamelistview, this will
|
|
||||||
// always succeed, even if we have to come full circle.
|
|
||||||
do {
|
|
||||||
++it;
|
++it;
|
||||||
if (it == sSystemVector.crend())
|
if (it == sSystemVector.crend())
|
||||||
it = sSystemVector.crbegin();
|
it = sSystemVector.crbegin();
|
||||||
} while (!(*it)->isVisible());
|
|
||||||
|
|
||||||
return *it;
|
return *it;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,14 +115,6 @@ public:
|
||||||
static std::vector<SystemData*> sSystemVector;
|
static std::vector<SystemData*> sSystemVector;
|
||||||
static std::unique_ptr<FindRules> sFindRules;
|
static std::unique_ptr<FindRules> sFindRules;
|
||||||
|
|
||||||
std::vector<SystemData*>::const_iterator getIterator() const
|
|
||||||
{
|
|
||||||
return std::find(sSystemVector.cbegin(), sSystemVector.cend(), this);
|
|
||||||
}
|
|
||||||
std::vector<SystemData*>::const_reverse_iterator getRevIterator() const
|
|
||||||
{
|
|
||||||
return std::find(sSystemVector.crbegin(), sSystemVector.crend(), this);
|
|
||||||
}
|
|
||||||
const bool isCollection() const { return mIsCollectionSystem; }
|
const bool isCollection() const { return mIsCollectionSystem; }
|
||||||
const bool isCustomCollection() const { return mIsCustomCollectionSystem; }
|
const bool isCustomCollection() const { return mIsCustomCollectionSystem; }
|
||||||
const bool isGroupedCustomCollection() const { return mIsGroupedCustomCollectionSystem; }
|
const bool isGroupedCustomCollection() const { return mIsGroupedCustomCollectionSystem; }
|
||||||
|
@ -132,8 +124,6 @@ public:
|
||||||
};
|
};
|
||||||
const bool isGameSystem() const { return mIsGameSystem; }
|
const bool isGameSystem() const { return mIsGameSystem; }
|
||||||
|
|
||||||
const bool isVisible() const;
|
|
||||||
|
|
||||||
static SystemData* getSystemByName(const std::string& systemName);
|
static SystemData* getSystemByName(const std::string& systemName);
|
||||||
SystemData* getNext() const;
|
SystemData* getNext() const;
|
||||||
SystemData* getPrev() const;
|
SystemData* getPrev() const;
|
||||||
|
|
Loading…
Reference in a new issue