mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-09 11:39:06 +00:00
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 <athena/Utility.hpp>
|
||||||
#include <hecl/Runtime.hpp>
|
#include <hecl/Runtime.hpp>
|
||||||
#include <hecl/hecl.hpp>
|
#include <hecl/hecl.hpp>
|
||||||
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
@ -268,12 +269,9 @@ void CVarManager::setCheatsEnabled(bool v, bool setDeserialized) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CVarManager::restartRequired() const {
|
bool CVarManager::restartRequired() const {
|
||||||
for (const auto& cv : m_cvars) {
|
return std::any_of(m_cvars.cbegin(), m_cvars.cend(), [](const auto& entry) {
|
||||||
if (cv.second->isModified() && cv.second->modificationRequiresRestart())
|
return entry.second->isModified() && entry.second->modificationRequiresRestart();
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVarManager::parseCommandLine(const std::vector<SystemString>& args) {
|
void CVarManager::parseCommandLine(const std::vector<SystemString>& args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user