feature merge bs-coreoptimize->trunk: added some compiler abstractions
- forceinline -> will force the compiler to always inline the given method - ra_algin(n) -> align to (n) .. (see: http://msdn.microsoft.com/en-us/library/83ythb65(v=vs.80).aspx for more informations). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16215 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
a79dcd2000
commit
f223818f59
@ -218,11 +218,19 @@ typedef uintptr_t uintptr;
|
|||||||
#define strtoull _strtoui64
|
#define strtoull _strtoui64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// keyword replacement in windows
|
// keyword replacement
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
// For MSVC (windows)
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
|
#define forceinline __forceinline
|
||||||
|
#define ra_align(n) __declspec(align(n))
|
||||||
|
#else
|
||||||
|
// For GCC
|
||||||
|
#define forceinline __attribute__((always_inline)) inline
|
||||||
|
#define ra_align(n) __attribute__(( aligned(n) ))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// for those still not building c++
|
// for those still not building c++
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user