diff --git a/CocosDenshion/include/SimpleAudioEngine.h b/CocosDenshion/include/SimpleAudioEngine.h index 8c9cf1c8c1..b180c67e47 100644 --- a/CocosDenshion/include/SimpleAudioEngine.h +++ b/CocosDenshion/include/SimpleAudioEngine.h @@ -40,7 +40,7 @@ public: virtual long getClassTypeInfo() = 0; }; -static unsigned int getHashCodeByString(const char *key) +static inline unsigned int getHashCodeByString(const char *key) { unsigned int len = strlen(key); const char *end=key+len; diff --git a/cocos2dx/include/ccTypeInfo.h b/cocos2dx/include/ccTypeInfo.h index 096c661003..c7eeeddf91 100644 --- a/cocos2dx/include/ccTypeInfo.h +++ b/cocos2dx/include/ccTypeInfo.h @@ -28,6 +28,8 @@ THE SOFTWARE. #include "platform/CCPlatformMacros.h" #include +#include +#include NS_CC_BEGIN @@ -37,7 +39,7 @@ public: virtual long getClassTypeInfo() = 0; }; -static unsigned int getHashCodeByString(const char *key) +static inline unsigned int getHashCodeByString(const char *key) { unsigned int len = strlen(key); const char *end=key+len;