summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2020-05-22 20:17:41 +0100
committerFrediano Ziglio <freddy77@gmail.com>2020-07-03 16:51:03 +0100
commit6fea9f59a760cbc1655de0d11a8abfa6567ae951 (patch)
tree2bd660163fc21931670a14736d1cd30edaa1f004 /vdagent
parentab6a4a0e18fffdeb9791c64b730de0552cf898b7 (diff)
desktop_layout: Update container iteration syntax
Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Julien Ropé <jrope@redhat.com>
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/desktop_layout.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
index 1b4c706..07074da 100644
--- a/vdagent/desktop_layout.cpp
+++ b/vdagent/desktop_layout.cpp
@@ -188,15 +188,12 @@ void DesktopLayout::set_position_configurable(bool flag)
// the virtual desktop. Caller is responsible to lock() & unlock().
void DesktopLayout::normalize_displays_pos()
{
- Displays::iterator iter;
- DisplayMode* mode;
LONG min_x = 0;
LONG min_y = 0;
LONG max_x = 0;
LONG max_y = 0;
- for (iter = _displays.begin(); iter != _displays.end(); iter++) {
- mode = *iter;
+ for (DisplayMode *mode : _displays) {
if (mode && mode->_attached) {
min_x = min(min_x, mode->_pos_x);
min_y = min(min_y, mode->_pos_y);
@@ -205,8 +202,7 @@ void DesktopLayout::normalize_displays_pos()
}
}
if (min_x || min_y) {
- for (iter = _displays.begin(); iter != _displays.end(); iter++) {
- mode = *iter;
+ for (DisplayMode *mode : _displays) {
if (mode) {
mode->move_pos(-min_x, -min_y);
}