Use snprintf and sscanf instead of std::string tomfoolery

Rename order_c to command_c for better readability
This commit is contained in:
Marc Di Luzio 2014-12-16 13:13:02 +00:00
parent b77411121a
commit 8a486fdd40
6 changed files with 71 additions and 127 deletions

View file

@ -58,7 +58,7 @@ const char* tests()
// Test if we can successfully convert orders back and forth
{
COrder order;
order.order = order_c::F;
order.command = command_c::F;
order.unit = 10;
std::string order_string = GetStringFromOrder(order);
COrder order2 = GetOrderFromString(order_string);
@ -120,7 +120,7 @@ const char* tests()
return "Game failed to add valid unit";
order.unit = id;
order.order = order_c::F;
order.command = command_c::F;
if( game.IssueOrder(0,order) )
return "Game failed to issue valid order";
@ -151,7 +151,7 @@ const char* tests()
return "Game failed to add valid unit";
order.unit = id;
order.order = order_c::A;
order.command = command_c::A;
if( game.IssueOrder(0,order) )
return "Game failed to issue valid order";