From 7259d36abfd2b36df08fb5fbc2f5c8efadf99a16 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 2 Feb 2009 00:38:34 +0100 Subject: [PATCH] Change waitingTiles from std::queue to std::deque std::queue can't be cleared portably. --- utils/TerraSync/terrasync.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx index 6d10f2b10..2ffbc52c0 100644 --- a/utils/TerraSync/terrasync.cxx +++ b/utils/TerraSync/terrasync.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -88,7 +88,7 @@ static void usage( const string& prog ) { #endif } -std::queue waitingTiles; +std::deque 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 ) );