summaryrefslogtreecommitdiffstats
path: root/src/widgets/ege-paint-def.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
commit169dff19d4da8d76e69b8e896aa25b0013639c03 (patch)
treea0c070fa95188b5cde708ac285e6a2db9df4a83f /src/widgets/ege-paint-def.cpp
parentAvoid creating a new document before opening an old document. (diff)
downloadinkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz
inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip
modernize loops
Diffstat (limited to 'src/widgets/ege-paint-def.cpp')
-rw-r--r--src/widgets/ege-paint-def.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/ege-paint-def.cpp b/src/widgets/ege-paint-def.cpp
index 7cc951c4a..fa654cb72 100644
--- a/src/widgets/ege-paint-def.cpp
+++ b/src/widgets/ege-paint-def.cpp
@@ -263,11 +263,11 @@ bool PaintDef::fromMIMEData(std::string const & type, char const * data, int len
}
if ( changed ) {
// beware of callbacks changing things
- for ( std::vector<HookData*>::iterator it = _listeners.begin(); it != _listeners.end(); ++it )
+ for (auto & _listener : _listeners)
{
- if ( (*it)->_cb )
+ if ( _listener->_cb )
{
- (*it)->_cb( (*it)->_data );
+ _listener->_cb( _listener->_data );
}
}
}
@@ -282,11 +282,11 @@ void PaintDef::setRGB( unsigned int r, unsigned int g, unsigned int b )
this->b = b;
// beware of callbacks changing things
- for ( std::vector<HookData*>::iterator it = _listeners.begin(); it != _listeners.end(); ++it )
+ for (auto & _listener : _listeners)
{
- if ( (*it)->_cb )
+ if ( _listener->_cb )
{
- (*it)->_cb( (*it)->_data );
+ _listener->_cb( _listener->_data );
}
}
}