Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Kaffeine/xray-16 into Kaffei…
Browse files Browse the repository at this point in the history
…ne-dev
  • Loading branch information
nitrocaster committed Jul 19, 2016
2 parents 2315534 + 1bee8ef commit b10a630
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
6 changes: 6 additions & 0 deletions src/Common/Compiler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#define XR_IMPORT __declspec(dllimport)
#endif

#if defined(__GNUC__)
#define XR_ASSUME(expr) if (expr){} else __builtin_unreachable()
#elif defined(_MSC_VER)
#define XR_ASSUME(expr) __assume(expr)
#endif

#if defined(__GNUC__)
#define NO_INLINE __attribute__((noinline))
#define FORCE_INLINE __attribute__((always_inline)) inline
Expand Down
1 change: 0 additions & 1 deletion src/Common/Platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "Common/Compiler.inl"

#include <ctime>
#include <sys\utime.h>

#if defined(LINUX)
#include "Common/PlatformLinux.inl"
Expand Down
2 changes: 2 additions & 0 deletions src/Common/PlatformWindows.inl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#define _WIN32_WINNT 0x0501
#endif

#include <sys/utime.h>

#define NOGDICAPMASKS
//#define NOSYSMETRICS
#define NOMENUS
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/memory_allocation_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void mem_alloc_clear_stats()
stats.clear();
}

__declspec(noinline) void save_stack_trace()
NO_INLINE void save_stack_trace()
{
if (!StatsGatherEnabled)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/xrCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
#include "xrsharedmem.h"
#include "xrstring.h"
#include "xr_resource.h"
#include "Compression\rt_compressor.h"
#include "Compression/rt_compressor.h"
#include "xr_shared.h"
#include "string_concatenations.h"

Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/xrDebug_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
#ifdef __BORLANDC__
#define NODEFAULT
#else
#define NODEFAULT __assume(0)
#define NODEFAULT XR_ASSUME(0)
#endif
#define VERIFY(expr) do {} while (false)
#define VERIFY2(expr, desc) do {} while (false)
Expand Down
13 changes: 6 additions & 7 deletions src/xrServerEntities/alife_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ namespace ALife {
eCombatTypeDummy = u32(-1),
};

//âîçìîæíîñòü ïîäêëþ÷åíèÿ àääîíîâ
enum EWeaponAddonStatus{
eAddonDisabled = 0, //íåëüçÿ ïðèñîåäåíèòü
eAddonPermanent = 1, //ïîñòîÿííî ïîäêëþ÷åíî ïî óìîë÷àíèþ
eAddonAttachable = 2 //ìîæíî ïðèñîåäèíÿòü
enum EWeaponAddonStatus {
eAddonDisabled = 0,
eAddonPermanent = 1,
eAddonAttachable = 2
};

IC EHitType g_tfString2HitType(LPCSTR caHitType)
Expand Down Expand Up @@ -178,7 +177,7 @@ namespace ALife {
#endif
}
#ifndef _EDITOR
xr_token hit_types_token [ ];
extern xr_token hit_types_token [ ];

IC LPCSTR g_cafHitType2String(EHitType tHitType)
{
Expand All @@ -195,4 +194,4 @@ xr_token hit_types_token [ ];
DEFINE_MAP (_STORY_ID, CSE_ALifeDynamicObject*, STORY_P_MAP, STORY_P_PAIR_IT);
};

#endif //XRAY_ALIFE_SPACE
#endif //XRAY_ALIFE_SPACE
3 changes: 2 additions & 1 deletion src/xrServerEntities/smart_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@

#define TL_FAST_COMPILATION
#undef STATIC_CHECK
#include <loki/typelist.h>

#ifdef PURE_DYNAMIC_CAST
# define smart_cast dynamic_cast
#else
# include <loki/Typelist.h>

# define PURE_DYNAMIC_CAST_COMPATIBILITY_CHECK

# ifdef DEBUG
Expand Down

0 comments on commit b10a630

Please sign in to comment.