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:
blacksirius 2012-06-02 17:24:47 +00:00
parent a79dcd2000
commit f223818f59

View File

@ -218,11 +218,19 @@ typedef uintptr_t uintptr;
#define strtoull _strtoui64
#endif
// keyword replacement in windows
// keyword replacement
#ifdef _WIN32
// For MSVC (windows)
#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
/////////////////////////////
// for those still not building c++
#ifndef __cplusplus