Skip to content

Commit 23ff8fd

Browse files
author
hanjukim
committed
Fix for g++ -Wall warnings
1 parent 68c929c commit 23ff8fd

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

findpath.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ int GetMap( int x, int y )
7676
class MapSearchNode
7777
{
7878
public:
79-
unsigned int x; // the (x,y) positions of the node
80-
unsigned int y;
79+
int x; // the (x,y) positions of the node
80+
int y;
8181

8282
MapSearchNode() { x = y = 0; }
83-
MapSearchNode( unsigned int px, unsigned int py ) { x=px; y=py; }
83+
MapSearchNode( int px, int py ) { x=px; y=py; }
8484

8585
float GoalDistanceEstimate( MapSearchNode &nodeGoal );
8686
bool IsGoal( MapSearchNode &nodeGoal );

fsa.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ template <class USER_TYPE> class FixedSizeAllocator
7171

7272
public: // methods
7373
FixedSizeAllocator( unsigned int MaxElements = FSA_DEFAULT_SIZE ) :
74-
m_MaxElements( MaxElements ),
75-
m_pFirstUsed( NULL )
74+
m_pFirstUsed( NULL ),
75+
m_MaxElements( MaxElements )
7676
{
7777
// Allocate enough memory for the maximum number of elements
7878

stlastar.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ using namespace std;
4848

4949
// disable warning that debugging information has lines that are truncated
5050
// occurs in stl headers
51+
#if defined(WIN32) && defined(_WINDOWS)
5152
#pragma warning( disable : 4786 )
53+
#endif
5254

5355
template <class T> class AStarState;
5456

@@ -117,23 +119,23 @@ template <class UserState> class AStarSearch
117119

118120
// constructor just initialises private data
119121
AStarSearch() :
120-
m_AllocateNodeCount(0),
122+
m_State( SEARCH_STATE_NOT_INITIALISED ),
123+
m_CurrentSolutionNode( NULL ),
121124
#if USE_FSA_MEMORY
122125
m_FixedSizeAllocator( 1000 ),
123126
#endif
124-
m_State( SEARCH_STATE_NOT_INITIALISED ),
125-
m_CurrentSolutionNode( NULL ),
127+
m_AllocateNodeCount(0),
126128
m_CancelRequest( false )
127129
{
128130
}
129131

130132
AStarSearch( int MaxNodes ) :
131-
m_AllocateNodeCount(0),
133+
m_State( SEARCH_STATE_NOT_INITIALISED ),
134+
m_CurrentSolutionNode( NULL ),
132135
#if USE_FSA_MEMORY
133136
m_FixedSizeAllocator( MaxNodes ),
134137
#endif
135-
m_State( SEARCH_STATE_NOT_INITIALISED ),
136-
m_CurrentSolutionNode( NULL ),
138+
m_AllocateNodeCount(0),
137139
m_CancelRequest( false )
138140
{
139141
}

0 commit comments

Comments
 (0)