Skip to content

Commit e9bc987

Browse files
author
nitrocaster
committed
Merge branch 'Kaffeine-dev' into dev
2 parents 2315534 + 16af9bb commit e9bc987

File tree

10 files changed

+25
-17
lines changed

10 files changed

+25
-17
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/xrCore.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
<OmitFramePointers>true</OmitFramePointers>
105105
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
106106
<WholeProgramOptimization>true</WholeProgramOptimization>
107-
<AdditionalIncludeDirectories>$(SolutionDir)Externals;$(SolutionDir)Externals\openssl\include;$(SolutionDir)Externals\lzo-2.02\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
107+
<AdditionalIncludeDirectories>$(SolutionDir)Externals;$(SolutionDir)Externals\openssl\include;$(SolutionDir)Externals\lzo\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
108108
<PreprocessorDefinitions>_USRDLL;XRCORE_EXPORTS;CRYPTO_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
109109
<StringPooling>true</StringPooling>
110110
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -137,7 +137,7 @@
137137
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
138138
<OmitFramePointers>false</OmitFramePointers>
139139
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
140-
<AdditionalIncludeDirectories>$(SolutionDir)Externals;$(SolutionDir)Externals\openssl\include;$(SolutionDir)Externals\lzo-2.02\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
140+
<AdditionalIncludeDirectories>$(SolutionDir)Externals;$(SolutionDir)Externals\openssl\include;$(SolutionDir)Externals\lzo\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
141141
<PreprocessorDefinitions>_USRDLL;XRCORE_EXPORTS;CRYPTO_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
142142
<StringPooling>true</StringPooling>
143143
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

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/xrGame/accumulative_states.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef ACCUMULATIVE_STATES_INCLUDED
22
#define ACCUMULATIVE_STATES_INCLUDED
33

4+
#include <loki/Typelist.h>
5+
46
namespace award_system
57
{
68

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# define PURE_DYNAMIC_CAST
1414
#endif // DEBUG
1515

16-
#define TL_FAST_COMPILATION
17-
#undef STATIC_CHECK
18-
#include <loki/typelist.h>
19-
2016
#ifdef PURE_DYNAMIC_CAST
2117
# define smart_cast dynamic_cast
2218
#else
19+
#define TL_FAST_COMPILATION
20+
#undef STATIC_CHECK
21+
# include <loki/Typelist.h>
22+
2323
# define PURE_DYNAMIC_CAST_COMPATIBILITY_CHECK
2424

2525
# ifdef DEBUG

0 commit comments

Comments
 (0)