diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 51b3dddc11..452e52b591 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -7231,7 +7231,6 @@ CC_KEYBOARD_SUPPORT, _USRDLL, ); - GCC_TREAT_WARNINGS_AS_ERRORS = NO; HEADER_SEARCH_PATHS = ""; LD_DYLIB_INSTALL_NAME = ""; LIBRARY_SEARCH_PATHS = ( @@ -7266,7 +7265,6 @@ CC_TARGET_OS_MAC, _USRDLL, ); - GCC_TREAT_WARNINGS_AS_ERRORS = NO; HEADER_SEARCH_PATHS = ""; LD_DYLIB_INSTALL_NAME = ""; LIBRARY_SEARCH_PATHS = ( @@ -7296,7 +7294,6 @@ "$(inherited)", CC_TARGET_OS_IPHONE, ); - GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; HEADER_SEARCH_PATHS = ""; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; @@ -7329,7 +7326,6 @@ "$(inherited)", CC_TARGET_OS_IPHONE, ); - GCC_TREAT_WARNINGS_AS_ERRORS = NO; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; HEADER_SEARCH_PATHS = ""; IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index fbccd74fa9..d06e3d4818 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -5706,6 +5706,7 @@ "CC_ENABLE_CHIPMUNK_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -5733,6 +5734,7 @@ "CC_ENABLE_CHIPMUNK_INTEGRATION=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index 262d97c73b..30c62d2eac 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -470,9 +470,9 @@ bool EffectNormalMapped::init() _kBump = 2; return true; } -bool EffectNormalMapped::initNormalMap(const std::string&normalMapFileName) +bool EffectNormalMapped::initNormalMap(const std::string& normalMapFileName) { - auto normalMapTextrue = TextureCache::getInstance()->addImage(normalMapFileName.c_str()); + auto normalMapTextrue = Director::getInstance()->getTextureCache()->addImage(normalMapFileName); getGLProgramState()->setUniformTexture("u_normalMap", normalMapTextrue); return true; } diff --git a/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.h b/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.h index 882dab3ed7..bcc1051da0 100644 --- a/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.h +++ b/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.h @@ -14,7 +14,7 @@ + (int) addTwoNumbers:(NSDictionary *)dict; + (void) callbackScriptHandler; -- (void) init; +- (id) init; @end #endif // COCOS2DX_SAMPLES_TESTLUA_PROJ_IOS_LUAOBJECTCBRIDGETEST_H diff --git a/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.mm b/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.mm index 624e338206..c54e97ca1a 100644 --- a/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.mm +++ b/tests/lua-tests/project/proj.ios_mac/mac/LuaObjectCBridgeTest.mm @@ -73,9 +73,10 @@ static LuaObjectCBridgeTest* s_instance = nil; } } -- (void)init +- (id)init { _scriptHandler = 0; + return self; } @end