diff options
author | Gregory Maxwell <greg@xiph.org> | 2013-10-18 02:56:52 +0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2013-10-28 21:18:54 +0400 |
commit | 7830cf1bd2c71bad9aa296254cf5c5f9842e8b8e (patch) | |
tree | 53f28e34554bee867a239849b96283bec549a607 /silk/macros.h | |
parent | 2891d852a38b3acb1810fad9f26ba7e0b181cfb2 (diff) |
Replace "inline" with OPUS_INLINE.
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.
Diffstat (limited to 'silk/macros.h')
-rw-r--r-- | silk/macros.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/silk/macros.h b/silk/macros.h index 35d63fa4..976f3b7d 100644 --- a/silk/macros.h +++ b/silk/macros.h @@ -32,7 +32,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "config.h" #endif -/* This is an inline header file for general platform. */ +#include "opus_types.h" +#include "opus_defines.h" + +/* This is an OPUS_INLINE header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_int16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16)) @@ -78,12 +81,12 @@ POSSIBILITY OF SUCH DAMAGE. #include "ecintrin.h" -static inline opus_int32 silk_CLZ16(opus_int16 in16) +static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16) { return 32 - EC_ILOG(in16<<16|0x8000); } -static inline opus_int32 silk_CLZ32(opus_int32 in32) +static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32) { return in32 ? 32 - EC_ILOG(in32) : 32; } |