mirror of https://github.com/AxioDL/metaforce.git
CVarManager: Use std::any_of for restartRequired()
Same thing, but more concise.
This commit is contained in:
parent
a1a18c6816
commit
a16327df68
|
@ -4,6 +4,7 @@
|
|||
#include <athena/Utility.hpp>
|
||||
#include <hecl/Runtime.hpp>
|
||||
#include <hecl/hecl.hpp>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <regex>
|
||||
|
||||
|
@ -268,12 +269,9 @@ void CVarManager::setCheatsEnabled(bool v, bool setDeserialized) {
|
|||
}
|
||||
|
||||
bool CVarManager::restartRequired() const {
|
||||
for (const auto& cv : m_cvars) {
|
||||
if (cv.second->isModified() && cv.second->modificationRequiresRestart())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return std::any_of(m_cvars.cbegin(), m_cvars.cend(), [](const auto& entry) {
|
||||
return entry.second->isModified() && entry.second->modificationRequiresRestart();
|
||||
});
|
||||
}
|
||||
|
||||
void CVarManager::parseCommandLine(const std::vector<SystemString>& args) {
|
||||
|
|
Loading…
Reference in New Issue