From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/ui/dialog/layers.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/ui/dialog/layers.cpp') diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index 46c733bf5..79bf767c7 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -480,14 +480,14 @@ void LayersPanel::_checkTreeSelection() } - for ( std::vector::iterator it = _watching.begin(); it != _watching.end(); ++it ) { - (*it)->set_sensitive( sensitive ); + for (auto & it : _watching) { + it->set_sensitive( sensitive ); } - for ( std::vector::iterator it = _watchingNonTop.begin(); it != _watchingNonTop.end(); ++it ) { - (*it)->set_sensitive( sensitiveNonTop ); + for (auto & it : _watchingNonTop) { + it->set_sensitive( sensitiveNonTop ); } - for ( std::vector::iterator it = _watchingNonBottom.begin(); it != _watchingNonBottom.end(); ++it ) { - (*it)->set_sensitive( sensitiveNonBottom ); + for (auto & it : _watchingNonBottom) { + it->set_sensitive( sensitiveNonBottom ); } } @@ -927,14 +927,14 @@ LayersPanel::LayersPanel() : - for ( std::vector::iterator it = _watching.begin(); it != _watching.end(); ++it ) { - (*it)->set_sensitive( false ); + for (auto & it : _watching) { + it->set_sensitive( false ); } - for ( std::vector::iterator it = _watchingNonTop.begin(); it != _watchingNonTop.end(); ++it ) { - (*it)->set_sensitive( false ); + for (auto & it : _watchingNonTop) { + it->set_sensitive( false ); } - for ( std::vector::iterator it = _watchingNonBottom.begin(); it != _watchingNonBottom.end(); ++it ) { - (*it)->set_sensitive( false ); + for (auto & it : _watchingNonBottom) { + it->set_sensitive( false ); } setDesktop( targetDesktop ); -- cgit v1.2.3