Just use the standard inline keyword with sufficient backwards compatibility defines, similar to how it is done in the main decoder and encoder libraries.
Showing the changes to codec/processing (3 of 3 files). Show all
Unified · Split
| @@ -47,15 +47,15 @@ · 46 unmodified lines | |||
| 47 | 47 | ||
| 48 | WELSVP_NAMESPACE_BEGIN | 48 | WELSVP_NAMESPACE_BEGIN |
| 49 | 49 | ||
| 50 | inline_t void* WelsMemset (void* pPointer, int32_t iValue, uint32_t uiSize) { | 50 | inline void* WelsMemset (void* pPointer, int32_t iValue, uint32_t uiSize) { |
| 51 | return ::memset (pPointer, iValue, uiSize); | 51 | return ::memset (pPointer, iValue, uiSize); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | inline_t void* WelsMemcpy (void* pDst, const void* kpSrc, uint32_t uiSize) { | 54 | inline void* WelsMemcpy (void* pDst, const void* kpSrc, uint32_t uiSize) { |
| 55 | return ::memcpy (pDst, kpSrc, uiSize); | 55 | return ::memcpy (pDst, kpSrc, uiSize); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | inline_t int32_t WelsMemcmp (const void* kpBuf1, const void* kpBuf2, uint32_t uiSize) { | 58 | inline int32_t WelsMemcmp (const void* kpBuf1, const void* kpBuf2, uint32_t uiSize) { |
| 59 | return ::memcmp (kpBuf1, kpBuf2, uiSize); | 59 | return ::memcmp (kpBuf1, kpBuf2, uiSize); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| @@ -68,11 +68,9 @@ typedef int int32_t ; · 67 unmodified lines | |||
| 68 | typedef unsigned int uint32_t ; | 68 | typedef unsigned int uint32_t ; |
| 69 | typedef __int64 int64_t ; | 69 | typedef __int64 int64_t ; |
| 70 | typedef unsigned __int64 uint64_t ; | 70 | typedef unsigned __int64 uint64_t ; |
| 71 | #define inline_t _inline | 71 | #if _MSC_VER < 1700 |
| 72 | 72 | #define inline __inline | |
| 73 | #else // GCC | 73 | #endif |
| 74 | |||
| 75 | #define inline_t inline | ||
| 76 | 74 | ||
| 77 | #endif | 75 | #endif |
| 78 | 76 | ||
| @@ -84,7 +84,7 @@ WELSVP_NAMESPACE_BEGIN · 83 unmodified lines | |||
| 84 | #define GET_METHOD(x) ((x) & 0xff) // mask method as the lowest 8bits | 84 | #define GET_METHOD(x) ((x) & 0xff) // mask method as the lowest 8bits |
| 85 | #define GET_SPECIAL(x) (((x) >> 8) & 0xff) // mask special flag as 8bits | 85 | #define GET_SPECIAL(x) (((x) >> 8) & 0xff) // mask special flag as 8bits |
| 86 | 86 | ||
| 87 | inline_t EMethods WelsVpGetValidMethod (int32_t a) { | 87 | inline EMethods WelsVpGetValidMethod (int32_t a) { |
| 88 | int32_t iMethod = GET_METHOD (a); | 88 | int32_t iMethod = GET_METHOD (a); |
| 89 | return WelsStaticCast (EMethods, WELS_CLAMP (iMethod, METHOD_NULL + 1, METHOD_MASK - 1)); | 89 | return WelsStaticCast (EMethods, WELS_CLAMP (iMethod, METHOD_NULL + 1, METHOD_MASK - 1)); |
| 90 | } | 90 | } |