]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/train.cpp
Pull the SetFlag class from mspcore
[r2c2.git] / source / libr2c2 / train.cpp
index 7de62363455549e92360039850982b6995e5765a..d78e6276ec14bd98780badaef96ddece39ed2be7 100644 (file)
@@ -1,6 +1,7 @@
 #include <algorithm>
 #include <cmath>
 #include <msp/core/maputils.h>
+#include <msp/core/raii.h>
 #include <msp/strings/format.h>
 #include <msp/time/units.h>
 #include <msp/time/utils.h>
 using namespace std;
 using namespace Msp;
 
-namespace {
-
-struct SetFlag
-{
-       bool &flag;
-
-       SetFlag(bool &f): flag(f) { flag = true; }
-       ~SetFlag() { flag = false; }
-};
-
-}
-
-
 namespace R2C2 {
 
 Train::Train(Layout &l, const VehicleType &t, unsigned a, const string &p):