Skip to content

Commit 2e5ee9c

Browse files
committed
Fix various minor issues
1 parent a902b75 commit 2e5ee9c

19 files changed

+31
-24
lines changed

src/Common/PlatformLinux.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ typedef unsigned char* LPBYTE;
150150
typedef unsigned int UINT;
151151
typedef int INT;
152152
typedef unsigned long ULONG;
153-
typedef unsigned long& ULONG_PTR;
153+
typedef unsigned long* ULONG_PTR;
154154
typedef long long int LARGE_INTEGER;
155155
typedef unsigned long long int ULARGE_INTEGER;
156156

@@ -208,7 +208,7 @@ typedef unsigned int UINT_PTR;
208208
typedef long LONG_PTR;
209209
#endif // XR_X64
210210

211-
typedef int HANDLE;
211+
typedef void* HANDLE;
212212
typedef void* HMODULE;
213213
typedef void* PVOID;
214214
typedef void* LPVOID;

src/xrGame/MainMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ bool CMainMenu::IsCDKeyIsValid()
761761
for (int i = 0; i < 4; i++)
762762
{
763763
GetGameID(&GameID, i);
764-
if (VerifyClientCheck(CDKey, unsigned short(GameID)) == 1)
764+
if (VerifyClientCheck(CDKey, (unsigned short)(GameID)) == 1)
765765
return true;
766766
};
767767
return false;

src/xrGame/PHSkeleton.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ void CPHSkeleton::RecursiveBonesCheck(u16 id)
388388
Flags64 mask;
389389
mask.assign(K->LL_GetBonesVisible());
390390
///////////////////////////////////////////
391-
if (mask.is(1ui64 << (u64)id) && !(BD.shape.flags.is(SBoneShape::sfRemoveAfterBreak)))
391+
if (mask.is(u64(1) << (u64)id) && !(BD.shape.flags.is(SBoneShape::sfRemoveAfterBreak)))
392392
{
393393
removable = false;
394394
return;

src/xrGame/ai/monsters/state.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "debug_text_tree.h"
99
#endif
1010

11+
inline TTime current_time() { return Device.dwTimeGlobal; }
12+
1113
template <typename _Object>
1214
class CState
1315
{

src/xrGame/ai/monsters/state_inline.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ EMonsterState CStateAbstract::get_state_type()
205205
TEMPLATE_SPECIALIZATION
206206
void CStateAbstract::remove_links(IGameObject* object)
207207
{
208-
SubStates::iterator i = substates.begin();
209-
SubStates::iterator e = substates.end();
208+
auto i = substates.begin();
209+
auto e = substates.end();
210210
for (; i != e; ++i)
211211
(*i).second->remove_links(object);
212212
}

src/xrGame/ai/monsters/states/monster_state_attack_on_run.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include "ai/weighted_random.h"
77

8-
inline TTime current_time() { return Device.dwTimeGlobal; }
98
template <typename _Object>
109
class CStateMonsterAttackOnRun : public CState<_Object>
1110
{

src/xrGame/ai/monsters/states/monster_state_squad_rest_follow_inline.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include "state_custom_action.h"
44
#include "state_move_to_point.h"
5+
#include "ai_monster_squad.h"
56

67
#define TEMPLATE_SPECIALIZATION \
78
template <typename _Object\

src/xrGame/attachable_item.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void CAttachableItem::afterDetach()
125125
object().processing_deactivate();
126126
}
127127

128-
virtual bool CAttachableItem::use_parent_ai_locations() const
128+
bool CAttachableItem::use_parent_ai_locations() const
129129
{
130130
return !enabled();
131131
}

src/xrGame/entity_alive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ ICollisionHitCallback* CEntityAlive::get_collision_hit_callback()
690690
if (cs)
691691
return cs->get_collision_hit_callback();
692692
else
693-
return false;
693+
return nullptr;
694694
}
695695

696696
void CEntityAlive::set_collision_hit_callback(ICollisionHitCallback* cc)

src/xrGame/game_sv_mp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ struct real_sender
229229
P = Packet;
230230
flags_to_send = flags;
231231
}
232+
232233
void operator()(IClient* client)
233234
{
234235
xrClientData* tmp_client = static_cast<xrClientData*>(client);

0 commit comments

Comments
 (0)