From c84c5761a19951d9abe5ab619c1e023de07c2e4b Mon Sep 17 00:00:00 2001 From: Stewart Imel Date: Wed, 30 May 2018 05:41:59 -0700 Subject: [PATCH] fix typos and grammar in comments (#18853) --- cocos/2d/CCActionInterval.cpp | 2 +- cocos/2d/CCNode.h | 2 +- cocos/physics/CCPhysicsWorld.h | 2 +- cocos/platform/CCImage.h | 2 +- cocos/renderer/CCTextureCache.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index 83d6a19255..bbc54a6554 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -332,7 +332,7 @@ void Sequence::startWithTarget(Node *target) return; } if (_duration > FLT_EPSILON) - // fix #14936 - FLT_EPSILON (instant action) / very fast duration (0.001) leads to worng split, that leads to call instant action few times + // fix #14936 - FLT_EPSILON (instant action) / very fast duration (0.001) leads to wrong split, that leads to call instant action few times _split = _actions[0]->getDuration() > FLT_EPSILON ? _actions[0]->getDuration() / _duration : 0; ActionInterval::startWithTarget(target); diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 902bd849d9..b16ed3839d 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -933,7 +933,7 @@ public: /** * Sorts the children array once before drawing, instead of every time when a child is added or reordered. - * This approach can improves the performance massively. + * This approach can improve the performance massively. * @note Don't call this manually unless a child added needs to be removed in the same frame. */ virtual void sortAllChildren(); diff --git a/cocos/physics/CCPhysicsWorld.h b/cocos/physics/CCPhysicsWorld.h index 65f3ec5ebf..9f63bc2958 100644 --- a/cocos/physics/CCPhysicsWorld.h +++ b/cocos/physics/CCPhysicsWorld.h @@ -61,7 +61,7 @@ typedef struct PhysicsRayCastInfo Vec2 contact; Vec2 normal; - // FIXME: correct thing to do is use `cpFlaot` instead of float. + // FIXME: correct thing to do is use `cpFloat` instead of float. // but in order to do so, we should include "chipmunk_types.h" // in Chipmunk v7.0, chipmunk_types includes all the mac types that // conflicts with cocos2d Size, Point,... etc types. And all the CocosStudio diff --git a/cocos/platform/CCImage.h b/cocos/platform/CCImage.h index a4315b00f2..6a7cebf20a 100644 --- a/cocos/platform/CCImage.h +++ b/cocos/platform/CCImage.h @@ -35,7 +35,7 @@ THE SOFTWARE. #include "platform/winrt/WICImageLoader-winrt.h" #endif -// premultiply alpha, or the effect will wrong when want to use other pixel format in Texture2D, +// premultiply alpha, or the effect will be wrong when using other pixel formats in Texture2D, // such as RGB888, RGB5A1 #define CC_RGB_PREMULTIPLY_ALPHA(vr, vg, vb, va) \ (unsigned)(((unsigned)((unsigned char)(vr) * ((unsigned char)(va) + 1)) >> 8) | \ diff --git a/cocos/renderer/CCTextureCache.h b/cocos/renderer/CCTextureCache.h index 1df4b30523..d96c2a45ca 100644 --- a/cocos/renderer/CCTextureCache.h +++ b/cocos/renderer/CCTextureCache.h @@ -52,7 +52,7 @@ NS_CC_BEGIN * @{ */ /* -* From version 3.0, TextureCache will never to treated as a singleton, it will be owned by director. +* From version 3.0, TextureCache will never be treated as a singleton, it will be owned by director. * All call by TextureCache::getInstance() should be replaced by Director::getInstance()->getTextureCache(). */