Skip to content

Commit 1c40428

Browse files
committed
Fix dangerous expressions
1 parent 8bbcaf8 commit 1c40428

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Client/mods/deathmatch/logic/CClientEntity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CClientManager;
3737
#define IS_PROJECTILE(entity) ((entity)->GetType()==CCLIENTPROJECTILE)
3838
#define IS_GUI(entity) ((entity)->GetType()==CCLIENTGUI)
3939
#define IS_IFP(entity) ((entity)->GetType()==CCLIENTIFP)
40-
#define CHECK_CGUI(entity,type) (((CClientGUIElement*)entity)->GetCGUIElement()->GetType()==type)
40+
#define CHECK_CGUI(entity,type) (((CClientGUIElement*)entity)->GetCGUIElement()->GetType()==(type))
4141

4242
enum eClientEntityType
4343
{

Client/mods/deathmatch/logic/CNametags.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using std::list;
2323
#define MAX_ALPHA 180.0f // max value is 255
2424

2525
#define DEFAULT_VIEW_RANGE 45.0f
26-
#define DEFAULT_VIEW_RANGE_EXP DEFAULT_VIEW_RANGE*DEFAULT_VIEW_RANGE
26+
#define DEFAULT_VIEW_RANGE_EXP ((DEFAULT_VIEW_RANGE)*(DEFAULT_VIEW_RANGE))
2727

2828
CNametags::CNametags(CClientManager* pManager)
2929
{

Client/sdk/gui/CGUI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CGUI;
4545
#define CGUI_ICON_SERVER_PASSWORD "cgui\\images\\locked.png"
4646
#define CGUI_GetMaxTextExtent(...) GetMaxTextExtent(__VA_ARGS__, SString())
4747

48-
#define CHECK_CHANNEL(channel) assert ( channel >= 0 && channel < INPUT_CHANNEL_COUNT )
48+
#define CHECK_CHANNEL(channel) assert ( (channel) >= 0 && (channel) < INPUT_CHANNEL_COUNT )
4949

5050
class CGUI
5151
{

0 commit comments

Comments
 (0)