stockpiles: fix compilation on windows

VS2010 only supports a subset of C++11
develop
Casey Link 2014-11-27 13:28:17 +01:00
parent f100d30f56
commit b6f5bcb7dc
1 changed files with 8 additions and 6 deletions

@ -637,7 +637,7 @@ private:
// importing // importing
FuncReadImport get_value; FuncReadImport get_value;
size_t serialized_count; size_t serialized_count;
bool valid = false; bool valid;
food_pair ( FuncWriteExport s, std::vector<char>* sp_v, FuncReadImport g, size_t count ) food_pair ( FuncWriteExport s, std::vector<char>* sp_v, FuncReadImport g, size_t count )
: set_value ( s ) : set_value ( s )
@ -646,7 +646,7 @@ private:
, serialized_count ( count ) , serialized_count ( count )
, valid ( true ) , valid ( true )
{} {}
food_pair() {} food_pair(): valid( false ) {}
}; };
/** /**
@ -2752,8 +2752,9 @@ static command_result savestock ( color_ostream &out, vector <string> & paramete
bool debug = false; bool debug = false;
std::string file; std::string file;
for ( std::string o : parameters ) for( size_t i = 0; i < parameters.size(); ++i )
{ {
const std::string o = parameters.at(i);
if ( o == "--debug" || o == "-d" ) if ( o == "--debug" || o == "-d" )
debug = true; debug = true;
else if ( !o.empty() && o[0] != '-' ) else if ( !o.empty() && o[0] != '-' )
@ -2801,8 +2802,9 @@ static command_result loadstock ( color_ostream &out, vector <string> & paramete
bool debug = false; bool debug = false;
std::string file; std::string file;
for ( std::string o : parameters ) for( size_t i = 0; i < parameters.size(); ++i )
{ {
const std::string o = parameters.at(i);
if ( o == "--debug" || o == "-d" ) if ( o == "--debug" || o == "-d" )
debug = true; debug = true;
else if ( !o.empty() && o[0] != '-' ) else if ( !o.empty() && o[0] != '-' )