SWORD25: Fix compilation and several warnings

svn-id: r53215
This commit is contained in:
Eugene Sandulenko 2010-08-05 13:42:10 +00:00
parent de0fe1db49
commit bf53914c2a
4 changed files with 25 additions and 25 deletions

View File

@ -54,8 +54,6 @@ namespace Sword25 {
class BS_RenderObject; class BS_RenderObject;
namespace Sword25 {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Klassendeklaration // Klassendeklaration
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -169,7 +169,7 @@ protected:
T *FindPtrByHandle(unsigned int Handle) { T *FindPtrByHandle(unsigned int Handle) {
// Zum Handle gehörigen Pointer finden. // Zum Handle gehörigen Pointer finden.
HANDLE2PTR_MAP::const_iterator it = m_Handle2PtrMap.find(Handle); typename HANDLE2PTR_MAP::const_iterator it = m_Handle2PtrMap.find(Handle);
// Pointer zurückgeben, oder, falls keiner gefunden wurde, 0 zurückgeben. // Pointer zurückgeben, oder, falls keiner gefunden wurde, 0 zurückgeben.
return (it != m_Handle2PtrMap.end()) ? it->_value : 0; return (it != m_Handle2PtrMap.end()) ? it->_value : 0;
@ -179,7 +179,7 @@ protected:
unsigned int FindHandleByPtr(T *ObjectPtr) { unsigned int FindHandleByPtr(T *ObjectPtr) {
// Zum Pointer gehöriges Handle finden. // Zum Pointer gehöriges Handle finden.
PTR2HANDLE_MAP::const_iterator it = m_Ptr2HandleMap.find(ObjectPtr); typename PTR2HANDLE_MAP::const_iterator it = m_Ptr2HandleMap.find(ObjectPtr);
// Handle zurückgeben, oder, falls keines gefunden wurde, 0 zurückgeben. // Handle zurückgeben, oder, falls keines gefunden wurde, 0 zurückgeben.
return (it != m_Ptr2HandleMap.end()) ? it->_value : 0; return (it != m_Ptr2HandleMap.end()) ? it->_value : 0;

View File

@ -301,9 +301,9 @@ static int NewWalkRegion(lua_State *L) {
static const char *GEO_LIBRARY_NAME = "Geo"; static const char *GEO_LIBRARY_NAME = "Geo";
static const luaL_reg GEO_FUNCTIONS[] = { static const luaL_reg GEO_FUNCTIONS[] = {
"NewRegion", NewRegion, {"NewRegion", NewRegion},
"NewWalkRegion", NewWalkRegion, {"NewWalkRegion", NewWalkRegion},
0, 0, {0, 0}
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -477,17 +477,17 @@ static int R_Delete(lua_State *L) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
static const luaL_reg REGION_METHODS[] = { static const luaL_reg REGION_METHODS[] = {
"SetPos", R_SetPos, {"SetPos", R_SetPos},
"SetX", R_SetX, {"SetX", R_SetX},
"SetY", R_SetY, {"SetY", R_SetY},
"GetPos", R_GetPos, {"GetPos", R_GetPos},
"IsPointInRegion", R_IsPointInRegion, {"IsPointInRegion", R_IsPointInRegion},
"GetX", R_GetX, {"GetX", R_GetX},
"GetY", R_GetY, {"GetY", R_GetY},
"IsValid", R_IsValid, {"IsValid", R_IsValid},
"Draw", R_Draw, {"Draw", R_Draw},
"GetCentroid", R_GetCentroid, {"GetCentroid", R_GetCentroid},
0, 0, {0, 0}
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -533,8 +533,8 @@ static int WR_GetPath(lua_State *L) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
static const luaL_reg WALKREGION_METHODS[] = { static const luaL_reg WALKREGION_METHODS[] = {
"GetPath", WR_GetPath, {"GetPath", WR_GetPath},
0, 0, {0, 0}
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -56,15 +56,17 @@ public:
void Move(int DeltaX, int DeltaY) { translate(DeltaX, DeltaY); } void Move(int DeltaX, int DeltaY) { translate(DeltaX, DeltaY); }
bool DoesIntersect(const BS_Rect &Rect) const { return intersects(Rect); } bool DoesIntersect(const BS_Rect &Rect_) const { return intersects(Rect_); }
bool Intersect(const BS_Rect &Rect, BS_Rect &Result) const { bool Intersect(const BS_Rect &Rect_, BS_Rect &Result) const {
Result = Rect; Result = Rect_;
Result.clip(*this); Result.clip(*this);
return Result.isEmpty();
} }
void Join(const BS_Rect &Rect, BS_Rect &Result) const { void Join(const BS_Rect &Rect_, BS_Rect &Result) const {
Result = Rect; Result = Rect_;
Result.extend(*this); Result.extend(*this);
} }