diff --git a/cocos/storage/local-storage/LocalStorage-android.cpp b/cocos/storage/local-storage/LocalStorage-android.cpp index 074449e04b..e0ef30a1f4 100644 --- a/cocos/storage/local-storage/LocalStorage-android.cpp +++ b/cocos/storage/local-storage/LocalStorage-android.cpp @@ -42,7 +42,7 @@ USING_NS_CC; static int _initialized = 0; -static className = "org/cocos2dx/lib/Cocos2dxLocalStorage"; +static std::string className = "org/cocos2dx/lib/Cocos2dxLocalStorage"; static void splitFilename (std::string& str) { @@ -63,7 +63,7 @@ void localStorageInit( const std::string& fullpath) { std::string strDBFilename = fullpath; splitFilename(strDBFilename); - if (JniHelper::CallStaticBooleanMethod(className, "init", strDBFilename, "data")) { + if (JniHelper::callStaticBooleanMethod(className, "init", strDBFilename, "data")) { _initialized = 1; } } @@ -72,7 +72,7 @@ void localStorageInit( const std::string& fullpath) void localStorageFree() { if( _initialized ) { - JniHelper::CallStaticVoidMethod(className, "destory"); + JniHelper::callStaticVoidMethod(className, "destory"); _initialized = 0; } } @@ -81,7 +81,7 @@ void localStorageFree() void localStorageSetItem( const std::string& key, const std::string& value) { assert( _initialized ); - JniHelper::CallStaticVoidMethod(className, "setItem", key, value); + JniHelper::callStaticVoidMethod(className, "setItem", key, value); } /** gets an item from the LS */ @@ -110,7 +110,7 @@ bool localStorageGetItem( const std::string& key, std::string *outItem ) void localStorageRemoveItem( const std::string& key ) { assert( _initialized ); - JniHelper::CallStaticVoidMethod(className, "removeItem", key); + JniHelper::callStaticVoidMethod(className, "removeItem", key); } @@ -118,7 +118,7 @@ void localStorageRemoveItem( const std::string& key ) void localStorageClear() { assert( _initialized ); - JniHelper::CallStaticVoidMethod(className, "clear"); + JniHelper::callStaticVoidMethod(className, "clear"); } #endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)