aboutsummaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index cf7ec1b72..0e44ee0bc 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -659,9 +659,7 @@ bool Settings::getNoiseParamsFromGroup(const std::string &name,
bool Settings::exists(const std::string &name) const
{
- MutexAutoLock lock(m_mutex);
-
- if (m_settings.find(name) != m_settings.end())
+ if (existsLocal(name))
return true;
if (auto parent = getParent())
return parent->exists(name);
@@ -669,6 +667,14 @@ bool Settings::exists(const std::string &name) const
}
+bool Settings::existsLocal(const std::string &name) const
+{
+ MutexAutoLock lock(m_mutex);
+
+ return m_settings.find(name) != m_settings.end();
+}
+
+
std::vector<std::string> Settings::getNames() const
{
MutexAutoLock lock(m_mutex);