Skip to content

Commit 7821a07

Browse files
committed
Engine: Fixed warnings
- Overloading the virtual method of parent class - Set but unused variable contacts
1 parent e01fc7a commit 7821a07

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

Engine/scenes/level/lvl_base_object.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class LVL_Section;
3535
class LevelScene;
3636
class LVL_Block;
3737
class PGE_LevelCamera;
38+
class PGE_Phys_Object;
39+
typedef PGE_Phys_Object *PhysObjPtr;
40+
3841
///
3942
/// \brief The PGE_Phys_Object class
4043
///

Engine/scenes/level/lvl_scene_trees.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void PGE_Phys_Object::TreeMapMember::updatePos()
7171
m_is_registered = true;
7272
}
7373
else
74-
st->update(m_self);
74+
st->updateAtTree(m_self);
7575
}
7676
else
7777
{
@@ -112,7 +112,7 @@ void PGE_Phys_Object::TreeMapMember::updatePosAndSize()
112112
m_is_registered = true;
113113
}
114114
else
115-
st->update(m_self);
115+
st->updateAtTree(m_self);
116116
}
117117
}
118118
else
@@ -141,7 +141,7 @@ void PGE_Phys_Object::TreeMapMember::updateSize()
141141
m_is_registered = true;
142142
}
143143
else
144-
st->update(m_self);
144+
st->updateAtTree(m_self);
145145

146146
}
147147
else

Engine/scenes/level/lvl_subtree.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ LVL_SubTree::~LVL_SubTree()
6868
}
6969
}
7070

71-
void LVL_SubTree::insert(LVL_SubTree::PhysObjPtr item)
71+
void LVL_SubTree::insert(PhysObjPtr item)
7272
{
7373
p->tree.Insert(item);
7474
}
7575

76-
void LVL_SubTree::update(LVL_SubTree::PhysObjPtr item)
76+
void LVL_SubTree::updateAtTree(PhysObjPtr item)
7777
{
7878
p->tree.Update(item);
7979
}
8080

81-
void LVL_SubTree::remove(LVL_SubTree::PhysObjPtr item)
81+
void LVL_SubTree::remove(PhysObjPtr item)
8282
{
8383
p->tree.Remove(item);
8484
}

Engine/scenes/level/lvl_subtree.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ class LVL_SubTree : public PGE_Phys_Object
3232
~LVL_SubTree();
3333

3434
typedef bool (*t_resultCallback)(PGE_Phys_Object*, void *);
35-
typedef PGE_Phys_Object *PhysObjPtr;
3635
void insert(PhysObjPtr item);
37-
void update(PhysObjPtr item);
36+
void updateAtTree(PhysObjPtr item);
3837
void remove(PhysObjPtr item);
3938
void clear();
4039
void query(PGE_RectF &zone, t_resultCallback a_resultCallback, void *context);

Engine/scenes/level/player/lvl_player_attaks_and_kills.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void LVL_Player::attackArea(PGE_RectF area, int action, int type, int filters)
7272
}
7373

7474
m_scene->queryItems(area, &bodies);
75-
int contacts = 0;
75+
//int contacts = 0;
7676
bool findBlocks = (filters & (F_LVLBlock)) != 0;
7777
//bool findBGOs = (filters & (LVLBGO << 1)) != 0;
7878
bool findNPCs = (filters & (F_LVLNPC)) != 0;
@@ -82,7 +82,7 @@ void LVL_Player::attackArea(PGE_RectF area, int action, int type, int filters)
8282
for(PGE_RenderList::iterator it = bodies.begin(); it != bodies.end(); it++)
8383
{
8484
PGE_Phys_Object *visibleBody = *it;
85-
contacts++;
85+
// contacts++;
8686
if(visibleBody == this) continue;
8787
if(visibleBody == NULL)
8888
continue;

0 commit comments

Comments
 (0)