Browse Source

common: move FORCEINLINE from port.h to xash3d_types.h, alongside other compiler-specific attributes

master
Alibek Omarov 11 months ago
parent
commit
edc08e39ef
  1. 8
      common/port.h
  2. 6
      common/xash3d_types.h

8
common/port.h

@ -35,7 +35,6 @@ GNU General Public License for more details. @@ -35,7 +35,6 @@ GNU General Public License for more details.
#define __cdecl
#define __stdcall
#define _inline static inline
#define FORCEINLINE inline __attribute__((always_inline))
#if XASH_POSIX
#include <unistd.h>
@ -63,13 +62,6 @@ GNU General Public License for more details. @@ -63,13 +62,6 @@ GNU General Public License for more details.
int x, y;
} POINT;
#else // WIN32
#ifdef __MINGW32__
#define _inline static inline
#define FORCEINLINE inline __attribute__((always_inline))
#else
#define FORCEINLINE __forceinline
#endif
#define open _open
#define read _read
#define alloca _alloca

6
common/xash3d_types.h

@ -86,6 +86,8 @@ typedef uint64_t longtime_t; @@ -86,6 +86,8 @@ typedef uint64_t longtime_t;
#define NORETURN __attribute__((noreturn))
#define NONNULL __attribute__((nonnull))
#define ALLOC_CHECK(x) __attribute__((alloc_size(x)))
#define FORCEINLINE inline __attribute__((always_inline))
#define NOINLINE __attribute__((noinline))
#elif defined(_MSC_VER)
#define EXPORT __declspec( dllexport )
#define GAME_EXPORT
@ -93,6 +95,8 @@ typedef uint64_t longtime_t; @@ -93,6 +95,8 @@ typedef uint64_t longtime_t;
#define NORETURN
#define NONNULL
#define ALLOC_CHECK(x)
#define FORCEINLINE __forceinline
#define NOINLINE __declspec( noinline )
#else
#define EXPORT
#define GAME_EXPORT
@ -100,6 +104,8 @@ typedef uint64_t longtime_t; @@ -100,6 +104,8 @@ typedef uint64_t longtime_t;
#define NORETURN
#define NONNULL
#define ALLOC_CHECK(x)
#define FORCEINLINE
#define NOINLINE
#endif
#if ( __GNUC__ >= 3 )

Loading…
Cancel
Save