Differentiate requested and actual crop.
[dcpomatic.git] / src / wx / suspender.cc
index 9b1b64c8504e260ff84dd5b718a3f4c5da8aa283..7680c147b097c9e36a3f14d9a7ae84f93039a086 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "suspender.h"
-#include <boost/foreach.hpp>
 
-Suspender::Suspender(boost::function<void (int)> handler)
+
+Suspender::Suspender(std::function<void (int)> handler)
        : _handler (handler)
-       , _count (0)
 {
 
 }
 
+
 Suspender::Block::Block (Suspender* s)
        : _suspender (s)
 {
        _suspender->increment ();
 }
 
+
 Suspender::Block::~Block ()
 {
        _suspender->decrement ();
 }
 
+
 Suspender::Block
 Suspender::block ()
 {
        return Block (this);
 }
 
+
 void
 Suspender::increment ()
 {
        ++_count;
 }
 
+
 void
 Suspender::decrement ()
 {
        --_count;
        if (_count == 0) {
-               BOOST_FOREACH (int i, _pending) {
+               for (auto i: _pending) {
                        _handler (i);
                }
                _pending.clear ();
        }
 }
 
+
 bool
 Suspender::check (int property)
 {