summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/objects.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/ui/dialog/objects.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/ui/dialog/objects.cpp')
-rw-r--r--src/ui/dialog/objects.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 2954ea418..9e115a2d6 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -661,14 +661,14 @@ void ObjectsPanel::_checkTreeSelection()
bool sensitiveNonTop = true;
bool sensitiveNonBottom = true;
- for ( std::vector<Gtk::Widget*>::iterator it = _watching.begin(); it != _watching.end(); ++it ) {
- (*it)->set_sensitive( sensitive );
+ for (auto & it : _watching) {
+ it->set_sensitive( sensitive );
}
- for ( std::vector<Gtk::Widget*>::iterator it = _watchingNonTop.begin(); it != _watchingNonTop.end(); ++it ) {
- (*it)->set_sensitive( sensitiveNonTop );
+ for (auto & it : _watchingNonTop) {
+ it->set_sensitive( sensitiveNonTop );
}
- for ( std::vector<Gtk::Widget*>::iterator it = _watchingNonBottom.begin(); it != _watchingNonBottom.end(); ++it ) {
- (*it)->set_sensitive( sensitiveNonBottom );
+ for (auto & it : _watchingNonBottom) {
+ it->set_sensitive( sensitiveNonBottom );
}
}
@@ -1478,9 +1478,8 @@ void ObjectsPanel::_highlightPickerColorMod()
guint32 rgba = color.toRGBA32( alpha );
//Set the highlight color for all items in the _highlight_target (all selected items)
- for (std::vector<SPItem *>::iterator iter = _highlight_target.begin(); iter != _highlight_target.end(); ++iter)
+ for (auto target : _highlight_target)
{
- SPItem * target = *iter;
target->setHighlightColor(rgba);
target->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT);
}
@@ -1929,14 +1928,14 @@ ObjectsPanel::ObjectsPanel() :
// -------------------------------------------------------
//Set initial sensitivity of buttons
- for ( std::vector<Gtk::Widget*>::iterator it = _watching.begin(); it != _watching.end(); ++it ) {
- (*it)->set_sensitive( false );
+ for (auto & it : _watching) {
+ it->set_sensitive( false );
}
- for ( std::vector<Gtk::Widget*>::iterator it = _watchingNonTop.begin(); it != _watchingNonTop.end(); ++it ) {
- (*it)->set_sensitive( false );
+ for (auto & it : _watchingNonTop) {
+ it->set_sensitive( false );
}
- for ( std::vector<Gtk::Widget*>::iterator it = _watchingNonBottom.begin(); it != _watchingNonBottom.end(); ++it ) {
- (*it)->set_sensitive( false );
+ for (auto & it : _watchingNonBottom) {
+ it->set_sensitive( false );
}
//Set up the color selection dialog