summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-19 15:25:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-20 17:05:57 +0300
commit48071e171de41a23197c7328ba038331a936e0eb (patch)
tree73c7ef1da8e5dd76469d75c0336d88c3371e4263 /src/configuration.cpp
parentd07fba228b5251862ad670e1d4f079c9456fab4b (diff)
downloadmv-48071e171de41a23197c7328ba038331a936e0eb.tar.gz
mv-48071e171de41a23197c7328ba038331a936e0eb.tar.bz2
mv-48071e171de41a23197c7328ba038331a936e0eb.tar.xz
mv-48071e171de41a23197c7328ba038331a936e0eb.zip
Replace for to FOR_EACH in some classes.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index cb9235c3f..1de179f6e 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -221,11 +221,8 @@ void Configuration::setValue(const std::string &key, const std::string &value)
if (list != mListenerMap.end())
{
Listeners listeners = list->second;
- for (ListenerIterator i = listeners.begin(), i_end = listeners.end();
- i != i_end; ++i)
- {
+ FOR_EACH (ListenerIterator, i, listeners)
(*i)->optionChanged(key);
- }
}
}
@@ -746,8 +743,7 @@ void Configuration::reInit()
void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer)
{
- for (Options::const_iterator i = mOptions.begin(), i_end = mOptions.end();
- i != i_end; ++i)
+ FOR_EACH (Options::const_iterator, i, mOptions)
{
#ifdef DEBUG_CONFIG
if (mLogKeys)
@@ -772,8 +768,7 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer)
XmlTextWriterWriteAttribute(writer, "name", name);
// recurse on all elements
- for (ConfigurationList::const_iterator elt_it = it->second.begin(),
- elt_it_end = it->second.end(); elt_it != elt_it_end; ++elt_it)
+ FOR_EACH (ConfigurationList::const_iterator, elt_it, it->second)
{
XmlTextWriterStartElement(writer, name);
if (*elt_it)
@@ -836,11 +831,8 @@ void Configuration::removeListener(const std::string &key,
void Configuration::removeListeners(ConfigListener *const listener)
{
- for (ListenerMapIterator it = mListenerMap.begin(),
- it_end = mListenerMap.end(); it != it_end; ++ it)
- {
+ FOR_EACH (ListenerMapIterator, it, mListenerMap)
(it->second).remove(listener);
- }
}
void Configuration::removeOldKeys()