- Minor GCC compat changes

- return( [CLASS]() ); generates a parse error (GCC Bug)

This was SVN commit r357.
This commit is contained in:
Simon Brenner 2004-06-02 16:11:32 +00:00
parent a1fb048fe5
commit df501b11ac
15 changed files with 26 additions and 25 deletions

View File

@ -36,4 +36,4 @@ public:
CBaseEntity* getTemplateByActor( CObjectEntry* actor );
};
#endif
#endif

View File

@ -76,4 +76,4 @@ public:
void render( float height ); // Temporary
};
#endif
#endif

View File

@ -41,7 +41,7 @@ HEntity getCollisionObject( CEntity* entity )
}
delete( entities );
return( HEntity() );
return HEntity();
}
HEntity getCollisionObject( CEntity* entity, float x, float y )
@ -90,4 +90,4 @@ bool getRayIntersection( const CVector2D& source, const CVector2D& forward, cons
delete( entities );
if( results->boundingObject ) return( true );
return( false );
}
}

View File

@ -32,4 +32,4 @@ HEntity getCollisionObject( CEntity* entity, float x, float y );
CBoundingObject* getContainingObject( const CVector2D& point );
bool getRayIntersection( const CVector2D& source, const CVector2D& forward, const CVector2D& right, float length, float maxDistance, rayIntersectionResults* results );
#endif
#endif

View File

@ -49,7 +49,7 @@ class CEntityManager;
class CEntity
{
friend CEntityManager;
friend class CEntityManager;
private:
// Intrinsic properties
public:
@ -91,4 +91,4 @@ public:
void pushOrder( CEntityOrder& order );
};
#endif
#endif

View File

@ -37,7 +37,7 @@ public:
class HEntity
{
friend CEntityManager;
friend class CEntityManager;
u16 m_handle;
void addRef();
void decRef();
@ -53,4 +53,4 @@ public:
~HEntity();
};
#endif
#endif

View File

@ -88,4 +88,4 @@ void CEntityManager::destroy( u16 handle )
delete( m_entities[handle].m_entity );
}
bool CEntityManager::m_extant = false;
bool CEntityManager::m_extant = false;

View File

@ -29,8 +29,8 @@
class CEntityManager : public Singleton<CEntityManager>
{
friend HEntity;
friend CHandle;
friend class HEntity;
friend class CHandle;
CHandle m_entities[MAX_HANDLES];
std::vector<HEntity> m_reaper;
int m_nextalloc;
@ -54,4 +54,5 @@ public:
}
};
#endif
#endif

View File

@ -28,4 +28,4 @@ struct CMessage
}
};
#endif
#endif

View File

@ -52,4 +52,4 @@ public:
SOrderData m_data[ORDER_MAX_DATA];
};
#endif
#endif

View File

@ -299,11 +299,11 @@ CStr CGenericProperty::toString()
return( CStr( buffer ) );
}
case PROP_PTR:
return( CStr() );
return CStr();
default:
assert( 0 && "Invalid property type" );
}
return( CStr() );
return CStr();
}
CVector3D CGenericProperty::toVector()
@ -316,11 +316,11 @@ CVector3D CGenericProperty::toVector()
case PROP_FLOAT:
case PROP_STRING:
case PROP_PTR:
return( CVector3D() );
return CVector3D();
default:
assert( 0 && "Invalid property type" );
}
return( CVector3D() );
return CVector3D();
}
void* CGenericProperty::toVoid()
@ -551,7 +551,7 @@ CGenericProperty::operator CStr&()
case PROP_FLOAT_INTRINSIC:
return( CStr( *m_floatptr ) );
default:
return( CStr() );
return CStr();
}
}
@ -562,7 +562,7 @@ CGenericProperty::operator CVector3D()
case PROP_VECTOR:
return( *m_vector );
default:
return( CVector3D() );
return CVector3D();
}
}

View File

@ -136,4 +136,4 @@ bool CEntity::processPatrol( CEntityOrder* current, float timestep )
m_orderQueue.push_front( this_segment );
m_orderQueue.push_back( repeat_patrol );
return( true );
}
}

View File

@ -4,4 +4,4 @@
void CPathfindEngine::requestPath( HEntity entity, const CVector2D& destination )
{
pathSparse( entity, destination );
}
}

View File

@ -207,4 +207,4 @@ void pathSparse( HEntity entity, CVector2D destination )
direct.m_data[0].location = destination;
entity->m_orderQueue.push_front( direct );
}
}
}

View File

@ -61,4 +61,4 @@ void nodeSmooth( HEntity entity, std::vector<CVector2D>& nodelist );
void pathSparse( HEntity entity, CVector2D destination );
bool pathSparseRecursive( HEntity entity, CVector2D from, CVector2D to, CBoundingObject* destinationCollisionObject );
#endif
#endif