Skip to content

Commit b10a630

Browse files
author
nitrocaster
committed
Merge branch 'dev' of https://github.com/Kaffeine/xray-16 into Kaffeine-dev
2 parents 2315534 + 1bee8ef commit b10a630

File tree

8 files changed

+19
-12
lines changed

8 files changed

+19
-12
lines changed

src/Common/Compiler.inl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
#define XR_IMPORT __declspec(dllimport)
1515
#endif
1616

17+
#if defined(__GNUC__)
18+
#define XR_ASSUME(expr) if (expr){} else __builtin_unreachable()
19+
#elif defined(_MSC_VER)
20+
#define XR_ASSUME(expr) __assume(expr)
21+
#endif
22+
1723
#if defined(__GNUC__)
1824
#define NO_INLINE __attribute__((noinline))
1925
#define FORCE_INLINE __attribute__((always_inline)) inline

src/Common/Platform.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "Common/Compiler.inl"
1919

2020
#include <ctime>
21-
#include <sys\utime.h>
2221

2322
#if defined(LINUX)
2423
#include "Common/PlatformLinux.inl"

src/Common/PlatformWindows.inl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#define _WIN32_WINNT 0x0501
88
#endif
99

10+
#include <sys/utime.h>
11+
1012
#define NOGDICAPMASKS
1113
//#define NOSYSMETRICS
1214
#define NOMENUS

src/xrCore/memory_allocation_stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void mem_alloc_clear_stats()
5858
stats.clear();
5959
}
6060

61-
__declspec(noinline) void save_stack_trace()
61+
NO_INLINE void save_stack_trace()
6262
{
6363
if (!StatsGatherEnabled)
6464
return;

src/xrCore/xrCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
#include "xrsharedmem.h"
123123
#include "xrstring.h"
124124
#include "xr_resource.h"
125-
#include "Compression\rt_compressor.h"
125+
#include "Compression/rt_compressor.h"
126126
#include "xr_shared.h"
127127
#include "string_concatenations.h"
128128

src/xrCore/xrDebug_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
#ifdef __BORLANDC__
100100
#define NODEFAULT
101101
#else
102-
#define NODEFAULT __assume(0)
102+
#define NODEFAULT XR_ASSUME(0)
103103
#endif
104104
#define VERIFY(expr) do {} while (false)
105105
#define VERIFY2(expr, desc) do {} while (false)

src/xrServerEntities/alife_space.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ namespace ALife {
139139
eCombatTypeDummy = u32(-1),
140140
};
141141

142-
//âîçìîæíîñòü ïîäêëþ÷åíèÿ àääîíîâ
143-
enum EWeaponAddonStatus{
144-
eAddonDisabled = 0, //íåëüçÿ ïðèñîåäåíèòü
145-
eAddonPermanent = 1, //ïîñòîÿííî ïîäêëþ÷åíî ïî óìîë÷àíèþ
146-
eAddonAttachable = 2 //ìîæíî ïðèñîåäèíÿòü
142+
enum EWeaponAddonStatus {
143+
eAddonDisabled = 0,
144+
eAddonPermanent = 1,
145+
eAddonAttachable = 2
147146
};
148147

149148
IC EHitType g_tfString2HitType(LPCSTR caHitType)
@@ -178,7 +177,7 @@ namespace ALife {
178177
#endif
179178
}
180179
#ifndef _EDITOR
181-
xr_token hit_types_token [ ];
180+
extern xr_token hit_types_token [ ];
182181

183182
IC LPCSTR g_cafHitType2String(EHitType tHitType)
184183
{
@@ -195,4 +194,4 @@ xr_token hit_types_token [ ];
195194
DEFINE_MAP (_STORY_ID, CSE_ALifeDynamicObject*, STORY_P_MAP, STORY_P_PAIR_IT);
196195
};
197196

198-
#endif //XRAY_ALIFE_SPACE
197+
#endif //XRAY_ALIFE_SPACE

src/xrServerEntities/smart_cast.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515

1616
#define TL_FAST_COMPILATION
1717
#undef STATIC_CHECK
18-
#include <loki/typelist.h>
1918

2019
#ifdef PURE_DYNAMIC_CAST
2120
# define smart_cast dynamic_cast
2221
#else
22+
# include <loki/Typelist.h>
23+
2324
# define PURE_DYNAMIC_CAST_COMPATIBILITY_CHECK
2425

2526
# ifdef DEBUG

0 commit comments

Comments
 (0)