From f67924cac9bfc9e93c15bb143f7b9b8015546c2c Mon Sep 17 00:00:00 2001 From: John Zhang Date: Thu, 18 Apr 2019 17:26:23 +0800 Subject: [PATCH] fix outdated documentation [ci skip] --- cocos/2d/CCSprite.h | 2 +- cocos/base/CCProtocols.h | 2 +- cocos/renderer/CCTextureAtlas.h | 4 ++-- cocos/renderer/CCTextureCache.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 10adf3ae3aa8..b087aa457418 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -184,7 +184,7 @@ class CC_DLL Sprite : public Node, public TextureProtocol * A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param. * If the SpriteFrame doesn't exist it will raise an exception. * - * @param spriteFrameName A null terminated string which indicates the sprite frame name. + * @param spriteFrameName The name of sprite frame. * @return An autoreleased sprite object. */ static Sprite* createWithSpriteFrameName(const std::string& spriteFrameName); diff --git a/cocos/base/CCProtocols.h b/cocos/base/CCProtocols.h index 7501a802854a..ae8c9b3b3170 100644 --- a/cocos/base/CCProtocols.h +++ b/cocos/base/CCProtocols.h @@ -236,7 +236,7 @@ class CC_DLL LabelProtocol /** * Sets a new label using a string * - * @param label A null terminated string + * @param label The name of the new label. * @js NA * @lua NA */ diff --git a/cocos/renderer/CCTextureAtlas.h b/cocos/renderer/CCTextureAtlas.h index ab564f4e3fa4..68d9ac35da79 100644 --- a/cocos/renderer/CCTextureAtlas.h +++ b/cocos/renderer/CCTextureAtlas.h @@ -67,7 +67,7 @@ class CC_DLL TextureAtlas : public Ref /** Creates a TextureAtlas with an filename and with an initial capacity for Quads. * The TextureAtlas capacity can be increased in runtime. - @param file A null terminated string contains the file path. + @param file The file path. @param capacity Capacity for Quads. */ static TextureAtlas* create(const std::string& file , ssize_t capacity); @@ -94,7 +94,7 @@ class CC_DLL TextureAtlas : public Ref * The TextureAtlas capacity can be increased in runtime. * @attention Do not reinitialize the TextureAtlas because it will leak memory (issue #706). - @param file A null terminated string contains the file path. + @param file The file path. @param capacity Capacity for Quads. */ bool initWithFile(const std::string& file, ssize_t capacity); diff --git a/cocos/renderer/CCTextureCache.h b/cocos/renderer/CCTextureCache.h index d96c2a45cac7..bebeebc5ccba 100644 --- a/cocos/renderer/CCTextureCache.h +++ b/cocos/renderer/CCTextureCache.h @@ -110,7 +110,7 @@ class CC_DLL TextureCache : public Ref * Object and it will return it. It will use the filename as a key. * Otherwise it will return a reference of a previously loaded image. * Supported image extensions: .png, .bmp, .tiff, .jpeg, .pvr. - @param filepath A null terminated string. + @param filepath The file path. */ Texture2D* addImage(const std::string &filepath); @@ -119,7 +119,7 @@ class CC_DLL TextureCache : public Ref * Otherwise it will load a texture in a new thread, and when the image is loaded, the callback will be called with the Texture2D as a parameter. * The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback. * Supported image extensions: .png, .jpg - @param filepath A null terminated string. + @param filepath The file path. @param callback A callback function would be invoked after the image is loaded. @since v0.8 */