]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/replay.cxx
Interim windows build fix
[flightgear.git] / src / Aircraft / replay.cxx
index cea3bf2637a0f2d4d542bf65fa7e5655a2af8c9d..c77cea6076478fd6b6a9f346e946a99b4761cb84 100644 (file)
@@ -25,6 +25,7 @@
 #  include "config.h"
 #endif
 
+#include <cstdio>
 #include <float.h>
 
 #include <simgear/constants.h>
@@ -128,7 +129,7 @@ FGReplay::clear()
     }
 
     // clear messages belonging to old replay session
-    fgGetNode("/sim/replay/messages", 0, true)->removeChildren("msg", false);
+    fgGetNode("/sim/replay/messages", 0, true)->removeChildren("msg");
 }
 
 /** 
@@ -571,7 +572,7 @@ FGReplay::record(double time)
 {
     FGReplayData* r = NULL;
 
-    if (recycler.size())
+    if (! recycler.empty())
     {
         r = recycler.front();
         recycler.pop_front();
@@ -587,7 +588,7 @@ void
 FGReplay::interpolate( double time, const replay_list_type &list)
 {
     // sanity checking
-    if ( list.size() == 0 )
+    if ( list.empty() )
     {
         // handle empty list
         return;
@@ -638,7 +639,7 @@ FGReplay::replay( double time ) {
 
     replayMessage(time);
 
-    if ( short_term.size() > 0 ) {
+    if ( ! short_term.empty() ) {
         t1 = short_term.back()->sim_time;
         t2 = short_term.front()->sim_time;
         if ( time > t1 ) {
@@ -648,7 +649,7 @@ FGReplay::replay( double time ) {
             return true;
         } else if ( time <= t1 && time >= t2 ) {
             interpolate( time, short_term );
-        } else if ( medium_term.size() > 0 ) {
+        } else if ( ! medium_term.empty() ) {
             t1 = short_term.front()->sim_time;
             t2 = medium_term.back()->sim_time;
             if ( time <= t1 && time >= t2 )
@@ -659,7 +660,7 @@ FGReplay::replay( double time ) {
                 t2 = medium_term.front()->sim_time;
                 if ( time <= t1 && time >= t2 ) {
                     interpolate( time, medium_term );
-                } else if ( long_term.size() > 0 ) {
+                } else if ( ! long_term.empty() ) {
                     t1 = medium_term.front()->sim_time;
                     t2 = long_term.back()->sim_time;
                     if ( time <= t1 && time >= t2 )
@@ -703,13 +704,13 @@ FGReplay::replay(double time, FGReplayData* pCurrentFrame, FGReplayData* pOldFra
 double
 FGReplay::get_start_time()
 {
-    if ( long_term.size() > 0 )
+    if ( ! long_term.empty() )
     {
         return long_term.front()->sim_time;
-    } else if ( medium_term.size() > 0 )
+    } else if ( ! medium_term.empty() )
     {
         return medium_term.front()->sim_time;
-    } else if ( short_term.size() )
+    } else if ( ! short_term.empty() )
     {
         return short_term.front()->sim_time;
     } else
@@ -721,7 +722,7 @@ FGReplay::get_start_time()
 double
 FGReplay::get_end_time()
 {
-    if ( short_term.size() )
+    if ( ! short_term.empty() )
     {
         return short_term.back()->sim_time;
     } else
@@ -906,7 +907,7 @@ FGReplay::saveTape(const SGPropertyNode* ConfigData)
     struct tm *local_tm;
     local_tm = localtime( &calendar_time );
     char time_str[256];
-    strftime( time_str, 256, "%Y%02m%02d-%02H%02M%02S", local_tm);
+    strftime( time_str, 256, "%Y%m%d-%H%M%S", local_tm);
     p.concat(time_str);
     p.concat(".fgtape");
 
@@ -1100,7 +1101,7 @@ FGReplay::listTapes(bool SameAircraftFilter, const SGPath& tapeDirectory)
     simgear::PathList list =  dir.children(simgear::Dir::TYPE_FILE, ".fgtape");
 
     SGPropertyNode* TapeList = fgGetNode("/sim/replay/tape-list", true);
-    TapeList->removeChildren("tape", false);
+    TapeList->removeChildren("tape");
     int Index = 0;
     size_t l = aircraftType.size();
     for (simgear::PathList::iterator it = list.begin(); it!=list.end(); ++it)