]> git.mxchange.org Git - flightgear.git/commitdiff
Change waitingTiles from std::queue to std::deque
authorTim Moore <timoore@redhat.com>
Sun, 1 Feb 2009 23:38:34 +0000 (00:38 +0100)
committerTim Moore <timoore@redhat.com>
Sun, 1 Feb 2009 23:58:01 +0000 (00:58 +0100)
std::queue can't be cleared portably.

utils/TerraSync/terrasync.cxx

index 6d10f2b1052ef6259f6683fd40e83a1b50a413f6..2ffbc52c0af40e9de465c8feea3db7fb013bd691 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <iostream>
 #include <string>
-#include <queue>
+#include <deque>
 
 #include <plib/netSocket.h>
 #include <plib/ul.h>
@@ -88,7 +88,7 @@ static void usage( const string& prog ) {
 #endif
 }
 
-std::queue<std::string> waitingTiles;
+std::deque<std::string> waitingTiles;
 
 #ifdef HAVE_SVN_CLIENT_H
 
@@ -337,7 +337,7 @@ static void sync_area( int lat, int lon ) {
             EW, abs(baselon), NS, abs(baselat),
             EW, abs(lon), NS, abs(lat) );
 
-    waitingTiles.push( dir );
+    waitingTiles.push_back( dir );
 }
 
 
@@ -452,7 +452,7 @@ int main( int argc, char **argv ) {
         if ( recv_msg ) {
             if ( lat != last_lat || lon != last_lon ) {
                cout << "pos in msg = " << lat << "," << lon << endl;
-               waitingTiles.c.clear();
+               waitingTiles.clear();
                 int lat_dir, lon_dir, dist;
                 if ( last_lat == nowhere || last_lon == nowhere ) {
                     lat_dir = lon_dir = 0;
@@ -485,7 +485,7 @@ int main( int argc, char **argv ) {
                    snprintf( dir, 512, "%s/%s", *tree, waitingTiles.front().c_str() );
                    sync_tree(dir);
                }
-               waitingTiles.pop();
+               waitingTiles.pop_front();
            } else {
                char c;
                while ( !isdigit( c = synced_other++ ) && !isupper( c ) );