Turn on all warnings, except reorder, and fix remaining warnings
This commit is contained in:
parent
50ed84c1bd
commit
99cd93ae22
4 changed files with 10 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -Wall -Wno-reorder" )
|
||||
|
||||
if( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g" )
|
||||
|
|
|
@ -73,6 +73,9 @@ uvector2 CTTRTSGame::GetNewPosition( const OrderUnitPair& pair ) const
|
|||
{
|
||||
case order_c::F:
|
||||
return pair.unit.getInFront();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return { ucoord_invalid,ucoord_invalid };
|
||||
|
@ -118,6 +121,8 @@ int CTTRTSGame::SimulateToNextTurn()
|
|||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,6 +165,8 @@ int CTTRTSGame::SimulateToNextTurn()
|
|||
pair.order = COrder();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ COrder GetOrderFromString( const std::string& _order )
|
|||
std::string order = _order;
|
||||
COrder ret;
|
||||
|
||||
int pos = order.find(ORDER_DELIMITER);
|
||||
size_t pos = order.find(ORDER_DELIMITER);
|
||||
if( pos != std::string::npos )
|
||||
{
|
||||
const std::string order_unit = order.substr(0, pos);
|
||||
|
|
|
@ -33,8 +33,8 @@ namespace
|
|||
CUnit::CUnit()
|
||||
: unit_id ( get_unique_unit_id() )
|
||||
, team_id ( team_id_invalid )
|
||||
, player_id ( player_id_invalid )
|
||||
, unit_vis ( unitVis_invalid )
|
||||
, player_id ( player_id_invalid )
|
||||
, dir ( dir_t::S )
|
||||
, pos ( { ucoord_invalid, ucoord_invalid } )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue