From a348cbda8b9e9c493eff445dcdf578449d18f70e Mon Sep 17 00:00:00 2001 From: mogemimi Date: Wed, 15 Jun 2016 16:01:26 +0900 Subject: [PATCH] Move StringUtils functions from deprecated header file to ccUTF8.h (#15835) * Move StringUtils functions outside of deprecated header * Replace deprecated headers with 'base/ccUTF8.h' --- cocos/2d/CCAction.cpp | 2 +- cocos/2d/CCFastTMXLayer.cpp | 2 +- cocos/2d/CCFastTMXTiledMap.cpp | 2 +- cocos/2d/CCFontFNT.cpp | 3 +-- cocos/2d/CCLabelAtlas.cpp | 3 +-- cocos/2d/CCLabelBMFont.cpp | 2 +- cocos/2d/CCLabelTTF.cpp | 2 +- cocos/2d/CCLayer.cpp | 4 +-- cocos/2d/CCMenu.cpp | 2 +- cocos/2d/CCMenuItem.cpp | 2 +- cocos/2d/CCNode.cpp | 2 +- cocos/2d/CCParticleBatchNode.cpp | 2 +- cocos/2d/CCParticleSystem.cpp | 2 +- cocos/2d/CCParticleSystemQuad.cpp | 3 +-- cocos/2d/CCScene.cpp | 2 +- cocos/2d/CCSprite.cpp | 4 +-- cocos/2d/CCSpriteBatchNode.cpp | 4 +-- cocos/2d/CCSpriteFrameCache.cpp | 4 +-- cocos/2d/CCTMXLayer.cpp | 2 +- cocos/2d/CCTMXTiledMap.cpp | 2 +- cocos/2d/CCTileMapAtlas.cpp | 3 +-- cocos/3d/CCSprite3D.cpp | 3 +-- cocos/base/CCProperties.cpp | 2 -- cocos/base/ccUTF8.cpp | 21 ++++++++++++++++ cocos/base/ccUTF8.h | 11 ++++++++ cocos/deprecated/CCArray.cpp | 1 + cocos/deprecated/CCDictionary.cpp | 1 + cocos/deprecated/CCString.cpp | 25 ------------------- cocos/deprecated/CCString.h | 19 +++----------- .../cocostudio/ActionTimeline/CSLoader.cpp | 2 +- cocos/network/CCDownloader-apple.mm | 2 +- .../Java_org_cocos2dx_lib_Cocos2dxHelper.cpp | 1 - cocos/platform/apple/CCFileUtils-apple.mm | 1 - .../platform/desktop/CCGLViewImpl-desktop.cpp | 1 - cocos/platform/linux/CCFileUtils-linux.cpp | 2 +- cocos/renderer/CCGLProgram.cpp | 3 +-- cocos/renderer/CCGLProgramState.cpp | 1 - cocos/renderer/CCTexture2D.cpp | 3 +-- cocos/renderer/CCTextureAtlas.cpp | 4 +-- cocos/renderer/CCTextureCache.cpp | 3 +-- .../manual/network/jsb_websocket.cpp | 2 +- cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm | 2 +- extensions/assets-manager/AssetsManagerEx.cpp | 2 +- .../CCEventListenerAssetsManagerEx.cpp | 2 +- 44 files changed, 71 insertions(+), 97 deletions(-) diff --git a/cocos/2d/CCAction.cpp b/cocos/2d/CCAction.cpp index 8f972e9537..596723c122 100644 --- a/cocos/2d/CCAction.cpp +++ b/cocos/2d/CCAction.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. #include "2d/CCActionInterval.h" #include "2d/CCNode.h" #include "base/CCDirector.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN // diff --git a/cocos/2d/CCFastTMXLayer.cpp b/cocos/2d/CCFastTMXLayer.cpp index 6d367cc037..b4700a698c 100644 --- a/cocos/2d/CCFastTMXLayer.cpp +++ b/cocos/2d/CCFastTMXLayer.cpp @@ -44,7 +44,7 @@ THE SOFTWARE. #include "renderer/CCRenderer.h" #include "renderer/CCVertexIndexBuffer.h" #include "base/CCDirector.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN namespace experimental { diff --git a/cocos/2d/CCFastTMXTiledMap.cpp b/cocos/2d/CCFastTMXTiledMap.cpp index 3a13b0bebc..6b87681306 100644 --- a/cocos/2d/CCFastTMXTiledMap.cpp +++ b/cocos/2d/CCFastTMXTiledMap.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCFastTMXTiledMap.h" #include "2d/CCFastTMXLayer.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN namespace experimental { diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index cd8ae17e3d..4a314d24e0 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -31,10 +31,9 @@ #include "base/CCConfiguration.h" #include "base/CCDirector.h" #include "base/CCMap.h" +#include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" -#include "deprecated/CCString.h" - using namespace std; NS_CC_BEGIN diff --git a/cocos/2d/CCLabelAtlas.cpp b/cocos/2d/CCLabelAtlas.cpp index 2edb1123f4..e0e0a3e2b3 100644 --- a/cocos/2d/CCLabelAtlas.cpp +++ b/cocos/2d/CCLabelAtlas.cpp @@ -28,10 +28,9 @@ THE SOFTWARE. #include "renderer/CCTextureAtlas.h" #include "platform/CCFileUtils.h" #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" -#include "deprecated/CCString.h" - #if CC_LABELATLAS_DEBUG_DRAW #include "renderer/CCRenderer.h" #endif diff --git a/cocos/2d/CCLabelBMFont.cpp b/cocos/2d/CCLabelBMFont.cpp index 3086bad2ed..9131d7ac41 100644 --- a/cocos/2d/CCLabelBMFont.cpp +++ b/cocos/2d/CCLabelBMFont.cpp @@ -32,7 +32,7 @@ http://www.angelcode.com/products/bmfont/ (Free, Windows only) ****************************************************************************/ #include "2d/CCLabelBMFont.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include "2d/CCSprite.h" #if CC_LABELBMFONT_DEBUG_DRAW diff --git a/cocos/2d/CCLabelTTF.cpp b/cocos/2d/CCLabelTTF.cpp index c19c037fc5..05ce8ed447 100644 --- a/cocos/2d/CCLabelTTF.cpp +++ b/cocos/2d/CCLabelTTF.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCLabelTTF.h" #include "2d/CCLabel.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 53459205c4..ae8cfa9614 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -40,9 +40,7 @@ THE SOFTWARE. #include "base/CCEventListenerKeyboard.h" #include "base/CCEventAcceleration.h" #include "base/CCEventListenerAcceleration.h" - - -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index 67da9e6134..1b7b581099 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -29,8 +29,8 @@ THE SOFTWARE. #include "base/CCTouch.h" #include "base/CCEventListenerTouch.h" #include "base/CCEventDispatcher.h" +#include "base/ccUTF8.h" #include "platform/CCStdC.h" -#include "deprecated/CCString.h" #include diff --git a/cocos/2d/CCMenuItem.cpp b/cocos/2d/CCMenuItem.cpp index e93bb48c5e..6a6775d78e 100644 --- a/cocos/2d/CCMenuItem.cpp +++ b/cocos/2d/CCMenuItem.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "2d/CCLabelAtlas.h" #include "2d/CCLabel.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index a71d2f47fa..cf55194147 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -35,6 +35,7 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/CCScheduler.h" #include "base/CCEventDispatcher.h" +#include "base/ccUTF8.h" #include "2d/CCCamera.h" #include "2d/CCActionManager.h" #include "2d/CCScene.h" @@ -43,7 +44,6 @@ THE SOFTWARE. #include "renderer/CCGLProgramState.h" #include "renderer/CCMaterial.h" #include "math/TransformUtils.h" -#include "deprecated/CCString.h" #if CC_NODE_RENDER_SUBPIXEL diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index acbe318fc1..ebc087b323 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -36,7 +36,7 @@ #include "renderer/CCRenderer.h" #include "renderer/CCTextureAtlas.h" #include "base/CCProfiling.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 338902bcb1..1b33f87063 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -52,8 +52,8 @@ THE SOFTWARE. #include "base/ZipUtils.h" #include "base/CCDirector.h" #include "base/CCProfiling.h" +#include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" -#include "deprecated/CCString.h" #include "platform/CCFileUtils.h" using namespace std; diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index 4ec6867382..c840124df6 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -41,8 +41,7 @@ THE SOFTWARE. #include "base/CCConfiguration.h" #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" - -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 6b8da8a013..7233aa92b1 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -30,9 +30,9 @@ THE SOFTWARE. #include "2d/CCCamera.h" #include "base/CCEventDispatcher.h" #include "base/CCEventListenerCustom.h" +#include "base/ccUTF8.h" #include "renderer/CCRenderer.h" #include "renderer/CCFrameBuffer.h" -#include "deprecated/CCString.h" #if CC_USE_PHYSICS #include "physics/CCPhysicsWorld.h" diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 18b8848509..79e49df30d 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -37,11 +37,9 @@ THE SOFTWARE. #include "renderer/CCTexture2D.h" #include "renderer/CCRenderer.h" #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "2d/CCCamera.h" -#include "deprecated/CCString.h" - - NS_CC_BEGIN // MARK: create, init, dealloc diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index eb3aaf02de..6879123da1 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -30,13 +30,11 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "base/CCDirector.h" #include "base/CCProfiling.h" +#include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCQuadCommand.h" -#include "deprecated/CCString.h" // For StringUtils::format - - NS_CC_BEGIN /* diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 86e73362a3..b41dbef6ca 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -37,14 +37,12 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "base/CCNS.h" #include "base/ccMacros.h" +#include "base/ccUTF8.h" #include "base/CCDirector.h" #include "renderer/CCTexture2D.h" #include "renderer/CCTextureCache.h" #include "base/CCNinePatchImageParser.h" -#include "deprecated/CCString.h" - - using namespace std; NS_CC_BEGIN diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index 49a2314f02..d5c4c76238 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -29,9 +29,9 @@ THE SOFTWARE. #include "2d/CCTMXTiledMap.h" #include "2d/CCSprite.h" #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "renderer/CCTextureCache.h" #include "renderer/CCGLProgram.h" -#include "deprecated/CCString.h" // For StringUtils::format NS_CC_BEGIN diff --git a/cocos/2d/CCTMXTiledMap.cpp b/cocos/2d/CCTMXTiledMap.cpp index e68717bea7..2206982deb 100644 --- a/cocos/2d/CCTMXTiledMap.cpp +++ b/cocos/2d/CCTMXTiledMap.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "2d/CCTMXXMLParser.h" #include "2d/CCTMXLayer.h" #include "2d/CCSprite.h" -#include "deprecated/CCString.h" // For StringUtils::format +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTileMapAtlas.cpp b/cocos/2d/CCTileMapAtlas.cpp index 18c772db27..086686e4ff 100644 --- a/cocos/2d/CCTileMapAtlas.cpp +++ b/cocos/2d/CCTileMapAtlas.cpp @@ -29,8 +29,7 @@ THE SOFTWARE. #include "renderer/CCTextureAtlas.h" #include "base/TGAlib.h" #include "base/CCDirector.h" -#include "deprecated/CCString.h" - +#include "base/ccUTF8.h" NS_CC_BEGIN diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 4b2bac5bec..63229c254b 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -32,6 +32,7 @@ #include "base/CCDirector.h" #include "base/CCAsyncTaskPool.h" +#include "base/ccUTF8.h" #include "2d/CCLight.h" #include "2d/CCCamera.h" #include "base/ccMacros.h" @@ -45,8 +46,6 @@ #include "renderer/CCTechnique.h" #include "renderer/CCPass.h" -#include "deprecated/CCString.h" // For StringUtils::format - NS_CC_BEGIN static Sprite3DMaterial* getSprite3DMaterialForAttribs(MeshVertexData* meshVertexData, bool usesLight); diff --git a/cocos/base/CCProperties.cpp b/cocos/base/CCProperties.cpp index 232eadf45e..cafdecd0b5 100644 --- a/cocos/base/CCProperties.cpp +++ b/cocos/base/CCProperties.cpp @@ -32,8 +32,6 @@ #include "math/Mat4.h" #include "base/ccUTF8.h" #include "base/CCData.h" -#include "deprecated/CCString.h" - USING_NS_CC; diff --git a/cocos/base/ccUTF8.cpp b/cocos/base/ccUTF8.cpp index 513f7a5361..22b0459f22 100644 --- a/cocos/base/ccUTF8.cpp +++ b/cocos/base/ccUTF8.cpp @@ -32,6 +32,27 @@ NS_CC_BEGIN namespace StringUtils { +std::string format(const char* format, ...) +{ +#define CC_MAX_STRING_LENGTH (1024*100) + + std::string ret; + + va_list ap; + va_start(ap, format); + + char* buf = (char*)malloc(CC_MAX_STRING_LENGTH); + if (buf != nullptr) + { + vsnprintf(buf, CC_MAX_STRING_LENGTH, format, ap); + ret = buf; + free(buf); + } + va_end(ap); + + return ret; +} + /* * @str: the string to search through. * @c: the character to not look for. diff --git a/cocos/base/ccUTF8.h b/cocos/base/ccUTF8.h index 90cc4d4050..5bd9acdc30 100644 --- a/cocos/base/ccUTF8.h +++ b/cocos/base/ccUTF8.h @@ -29,6 +29,7 @@ #include "platform/CCPlatformMacros.h" #include #include +#include #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "platform/android/jni/JniHelper.h" @@ -38,6 +39,16 @@ NS_CC_BEGIN namespace StringUtils { +template +std::string toString(T arg) +{ + std::stringstream ss; + ss << arg; + return ss.str(); +} + +std::string CC_DLL format(const char* format, ...) CC_FORMAT_PRINTF(1, 2); + /** * @brief Converts from UTF8 string to UTF16 string. * diff --git a/cocos/deprecated/CCArray.cpp b/cocos/deprecated/CCArray.cpp index 2f394bdd49..7398c5341b 100644 --- a/cocos/deprecated/CCArray.cpp +++ b/cocos/deprecated/CCArray.cpp @@ -26,6 +26,7 @@ THE SOFTWARE. #include "deprecated/CCArray.h" #include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/deprecated/CCDictionary.cpp b/cocos/deprecated/CCDictionary.cpp index 23a3f4eae6..03f8bc1680 100644 --- a/cocos/deprecated/CCDictionary.cpp +++ b/cocos/deprecated/CCDictionary.cpp @@ -25,6 +25,7 @@ #include "deprecated/CCDictionary.h" #include +#include "base/ccUTF8.h" #include "platform/CCFileUtils.h" #include "deprecated/CCString.h" #include "deprecated/CCBool.h" diff --git a/cocos/deprecated/CCString.cpp b/cocos/deprecated/CCString.cpp index 3381a96cb9..987ffffa8c 100644 --- a/cocos/deprecated/CCString.cpp +++ b/cocos/deprecated/CCString.cpp @@ -272,30 +272,5 @@ __String* __String::clone() const { return __String::create(_string); } - -namespace StringUtils { - -std::string format(const char* format, ...) -{ -#define CC_MAX_STRING_LENGTH (1024*100) - - std::string ret; - - va_list ap; - va_start(ap, format); - - char* buf = (char*)malloc(CC_MAX_STRING_LENGTH); - if (buf != nullptr) - { - vsnprintf(buf, CC_MAX_STRING_LENGTH, format, ap); - ret = buf; - free(buf); - } - va_end(ap); - - return ret; -} - -} // namespace StringUtils { NS_CC_END diff --git a/cocos/deprecated/CCString.h b/cocos/deprecated/CCString.h index 26a59916a1..9c4981cfa0 100644 --- a/cocos/deprecated/CCString.h +++ b/cocos/deprecated/CCString.h @@ -34,10 +34,13 @@ THE SOFTWARE. #include #include #include -#include #include "deprecated/CCArray.h" #include "base/CCRef.h" +// We need to include `StringUtils::format()` and `StringUtils::toString()` +// for keeping the backward compatibility +#include "base/ccUTF8.h" + NS_CC_BEGIN /** @@ -207,20 +210,6 @@ struct StringCompare : public std::binary_function<__String *, __String *, bool> #define StringMake(str) String::create(str) #define ccs StringMake -namespace StringUtils { - -template -std::string toString(T arg) -{ - std::stringstream ss; - ss << arg; - return ss.str(); -} - -std::string CC_DLL format(const char* format, ...) CC_FORMAT_PRINTF(1, 2); - -} // namespace StringUtils { - // end of data_structure group /// @} diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp index fc63343afb..db5e761757 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CSLoader.cpp @@ -26,12 +26,12 @@ #include "base/ObjectFactory.h" #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "ui/CocosGUI.h" #include "2d/CCSpriteFrameCache.h" #include "2d/CCParticleSystemQuad.h" #include "2d/CCTMXTiledMap.h" #include "platform/CCFileUtils.h" -#include "deprecated/CCString.h" #include "editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h" #include "editor-support/cocostudio/ActionTimeline/CCActionTimeline.h" diff --git a/cocos/network/CCDownloader-apple.mm b/cocos/network/CCDownloader-apple.mm index 8af5c95863..0613d7df30 100644 --- a/cocos/network/CCDownloader-apple.mm +++ b/cocos/network/CCDownloader-apple.mm @@ -25,7 +25,7 @@ #include "network/CCDownloader-apple.h" #include "network/CCDownloader.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include //////////////////////////////////////////////////////////////////////////////// diff --git a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp index 391c07063f..1503950f8b 100644 --- a/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp +++ b/cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp @@ -29,7 +29,6 @@ THE SOFTWARE. #include "platform/android/jni/JniHelper.h" #include "platform/android/CCFileUtils-android.h" #include "android/asset_manager_jni.h" -#include "deprecated/CCString.h" #include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" #include "base/ccUTF8.h" diff --git a/cocos/platform/apple/CCFileUtils-apple.mm b/cocos/platform/apple/CCFileUtils-apple.mm index d415e21bb3..11a701de23 100644 --- a/cocos/platform/apple/CCFileUtils-apple.mm +++ b/cocos/platform/apple/CCFileUtils-apple.mm @@ -33,7 +33,6 @@ THE SOFTWARE. #include #include "base/CCDirector.h" -#include "deprecated/CCString.h" #include "deprecated/CCDictionary.h" #include "platform/CCFileUtils.h" #include "platform/CCSAXParser.h" diff --git a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp index 424a212ce1..a16177c770 100644 --- a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp +++ b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp @@ -37,7 +37,6 @@ THE SOFTWARE. #include "base/ccUtils.h" #include "base/ccUTF8.h" #include "2d/CCCamera.h" -#include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/platform/linux/CCFileUtils-linux.cpp b/cocos/platform/linux/CCFileUtils-linux.cpp index 5d3753c7e2..658f43ba91 100644 --- a/cocos/platform/linux/CCFileUtils-linux.cpp +++ b/cocos/platform/linux/CCFileUtils-linux.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include "platform/linux/CCApplication-linux.h" #include "platform/CCCommon.h" #include "base/ccMacros.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include #include #include diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index dd9314e479..e37dce0ecc 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -33,12 +33,11 @@ THE SOFTWARE. #endif #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "base/uthash.h" #include "renderer/ccGLStateCache.h" #include "platform/CCFileUtils.h" -#include "deprecated/CCString.h" - // helper functions static void replaceDefines(const std::string& compileTimeDefines, std::string& out) diff --git a/cocos/renderer/CCGLProgramState.cpp b/cocos/renderer/CCGLProgramState.cpp index 97241793d0..60703c28a0 100644 --- a/cocos/renderer/CCGLProgramState.cpp +++ b/cocos/renderer/CCGLProgramState.cpp @@ -39,7 +39,6 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "base/CCEventDispatcher.h" #include "2d/CCCamera.h" -#include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index 4bf8dbe965..2444fd7548 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -39,6 +39,7 @@ THE SOFTWARE. #include "platform/CCDevice.h" #include "base/ccConfig.h" #include "base/ccMacros.h" +#include "base/ccUTF8.h" #include "base/CCConfiguration.h" #include "platform/CCPlatformMacros.h" #include "base/CCDirector.h" @@ -46,8 +47,6 @@ THE SOFTWARE. #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgramCache.h" #include "base/CCNinePatchImageParser.h" -#include "deprecated/CCString.h" - #if CC_ENABLE_CACHE_TEXTURE_DATA #include "renderer/CCTextureCache.h" diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index fde935cac5..bba4518153 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -30,6 +30,7 @@ THE SOFTWARE. #include #include "base/ccMacros.h" +#include "base/ccUTF8.h" #include "base/CCEventType.h" #include "base/CCDirector.h" #include "base/CCConfiguration.h" @@ -42,9 +43,6 @@ THE SOFTWARE. #include "renderer/CCTexture2D.h" #include "platform/CCGL.h" - -#include "deprecated/CCString.h" - //According to some tests GL_TRIANGLE_STRIP is slower, MUCH slower. Probably I'm doing something very wrong // implementation TextureAtlas diff --git a/cocos/renderer/CCTextureCache.cpp b/cocos/renderer/CCTextureCache.cpp index 00995c7d8b..fbf0b0cc37 100644 --- a/cocos/renderer/CCTextureCache.cpp +++ b/cocos/renderer/CCTextureCache.cpp @@ -34,12 +34,11 @@ THE SOFTWARE. #include "renderer/CCTexture2D.h" #include "base/ccMacros.h" +#include "base/ccUTF8.h" #include "base/CCDirector.h" #include "base/CCScheduler.h" #include "platform/CCFileUtils.h" #include "base/ccUtils.h" - -#include "deprecated/CCString.h" #include "base/CCNinePatchImageParser.h" diff --git a/cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp b/cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp index 75ea22426a..6e4afd1012 100644 --- a/cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp +++ b/cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp @@ -23,7 +23,7 @@ #include "scripting/js-bindings/manual/network/jsb_websocket.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include "network/WebSocket.h" #include "platform/CCPlatformMacros.h" #include "scripting/js-bindings/manual/ScriptingCore.h" diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm index 0c07ed46f5..3224822309 100644 --- a/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm +++ b/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm @@ -28,8 +28,8 @@ #include "ui/UIEditBox/UIEditBoxImpl-mac.h" #include "base/CCDirector.h" +#include "base/ccUTF8.h" #include "ui/UIEditBox/UIEditBox.h" -#include "deprecated/CCString.h" #include "ui/UIEditBox/Mac/CCUIEditBoxMac.h" NS_CC_BEGIN diff --git a/extensions/assets-manager/AssetsManagerEx.cpp b/extensions/assets-manager/AssetsManagerEx.cpp index 557d9ceb05..cde7143c95 100644 --- a/extensions/assets-manager/AssetsManagerEx.cpp +++ b/extensions/assets-manager/AssetsManagerEx.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "AssetsManagerEx.h" #include "CCEventListenerAssetsManagerEx.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" #include "base/CCDirector.h" #include diff --git a/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp b/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp index 210dd9c48c..cbe6755b8b 100644 --- a/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp +++ b/extensions/assets-manager/CCEventListenerAssetsManagerEx.cpp @@ -25,7 +25,7 @@ #include "CCEventListenerAssetsManagerEx.h" #include "CCEventAssetsManagerEx.h" #include "AssetsManagerEx.h" -#include "deprecated/CCString.h" +#include "base/ccUTF8.h" NS_CC_EXT_BEGIN