diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/widgets/ege-paint-def.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-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.cpp | 12 |
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 ); } } } |
