From 270c6392d41ca888e309f3c2879fd9ac517f56e2 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 8 Feb 2023 11:23:44 +0100 Subject: [PATCH] Dictionary#Remove(): remove unused bool overrideFrozen --- lib/base/dictionary.cpp | 10 ++++------ lib/base/dictionary.hpp | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp index 435df3159..b8ec3a5e1 100644 --- a/lib/base/dictionary.cpp +++ b/lib/base/dictionary.cpp @@ -141,13 +141,12 @@ Dictionary::Iterator Dictionary::End() * Removes the item specified by the iterator from the dictionary. * * @param it The iterator. - * @param overrideFrozen Whether to allow modifying frozen dictionaries. */ -void Dictionary::Remove(Dictionary::Iterator it, bool overrideFrozen) +void Dictionary::Remove(Dictionary::Iterator it) { ASSERT(OwnsLock()); - if (m_Frozen && !overrideFrozen) + if (m_Frozen) BOOST_THROW_EXCEPTION(std::invalid_argument("Dictionary must not be modified.")); m_Data.erase(it); @@ -157,13 +156,12 @@ void Dictionary::Remove(Dictionary::Iterator it, bool overrideFrozen) * Removes the specified key from the dictionary. * * @param key The key. - * @param overrideFrozen Whether to allow modifying frozen dictionaries. */ -void Dictionary::Remove(const String& key, bool overrideFrozen) +void Dictionary::Remove(const String& key) { ObjectLock olock(this); - if (m_Frozen && !overrideFrozen) + if (m_Frozen) BOOST_THROW_EXCEPTION(std::invalid_argument("Dictionary must not be modified.")); Dictionary::Iterator it; diff --git a/lib/base/dictionary.hpp b/lib/base/dictionary.hpp index 227868751..298cdf22c 100644 --- a/lib/base/dictionary.hpp +++ b/lib/base/dictionary.hpp @@ -49,9 +49,9 @@ public: size_t GetLength() const; - void Remove(const String& key, bool overrideFrozen = false); + void Remove(const String& key); - void Remove(Iterator it, bool overrideFrozen = false); + void Remove(Iterator it); void Clear(bool overrideFrozen = false);