From 7c298bdcd7cd4a314a7d199f35f217dbdeb00092 Mon Sep 17 00:00:00 2001 From: Allen Lee Date: Tue, 6 Sep 2016 11:14:14 +0900 Subject: [PATCH] misspelling check on cocos directory (#16522) Misspelling fix on some comments, cocos/editor-support/cocostudio/CSParseBinary_generated.h fix misspelling postion -> position --- cocos/3d/CCMesh.cpp | 2 +- .../ActionTimeline/CCActionTimelineCache.cpp | 2 +- .../cocostudio/ActionTimeline/CCBoneNode.h | 2 +- .../cocostudio/CSParseBinary_generated.h | 10 +++++----- cocos/editor-support/spine/Atlas.c | 2 +- cocos/network/HttpResponse.h | 2 +- .../org/cocos2dx/lib/Cocos2dxReflectionHelper.java | 2 +- cocos/renderer/CCGLProgram.cpp | 2 +- cocos/renderer/ccShader_3D_PositionTex.vert | 10 +++++----- .../js-bindings/script/debugger/actors/object.js | 2 +- .../js-bindings/script/debugger/webconsole/utils.js | 4 ++-- cocos/scripting/js-bindings/script/jsb_boot.js | 2 +- cocos/scripting/js-bindings/script/jsb_cocos2d.js | 12 ++++++------ cocos/scripting/js-bindings/script/jsb_common.js | 4 ++-- .../lua-bindings/auto/api/LayoutComponent.lua | 2 +- cocos/ui/UILayoutComponent.h | 2 +- cocos/ui/UIPageView.h | 4 ++-- 17 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cocos/3d/CCMesh.cpp b/cocos/3d/CCMesh.cpp index 3ed8cae596..2b69255a84 100644 --- a/cocos/3d/CCMesh.cpp +++ b/cocos/3d/CCMesh.cpp @@ -356,7 +356,7 @@ void Mesh::setMaterial(Material* material) } } } - // Was the texture set before teh GLProgramState ? Set it + // Was the texture set before the GLProgramState ? Set it for(auto& tex : _textures) setTexture(tex.second, tex.first); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index e2a4a3bd1a..b53fb5f2f4 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -640,7 +640,7 @@ Frame* ActionTimelineCache::loadPositionFrameWithFlatBuffers(const flatbuffers:: { PositionFrame* frame = PositionFrame::create(); - auto f_position = flatbuffers->postion(); + auto f_position = flatbuffers->position(); Vec2 position(f_position->x(), f_position->y()); frame->setPosition(position); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCBoneNode.h b/cocos/editor-support/cocostudio/ActionTimeline/CCBoneNode.h index 5d552d63d6..c66e53519f 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCBoneNode.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCBoneNode.h @@ -110,7 +110,7 @@ public: virtual const cocos2d::BlendFunc & getBlendFunc() const override { return _blendFunc; } // debug draw show, bone's debugdraw can be draw when bone is visible - // when bone's added to skeleton, DebugDrawEnabled controled by skeleton's DebugDrawEnabled + // when bone's added to skeleton, DebugDrawEnabled controlled by skeleton's DebugDrawEnabled virtual void setDebugDrawEnabled(bool isDebugDraw); virtual bool isDebugDrawEnabled() const { return _isRackShow; } diff --git a/cocos/editor-support/cocostudio/CSParseBinary_generated.h b/cocos/editor-support/cocostudio/CSParseBinary_generated.h index f3d7012cfa..3174f6f2c1 100644 --- a/cocos/editor-support/cocostudio/CSParseBinary_generated.h +++ b/cocos/editor-support/cocostudio/CSParseBinary_generated.h @@ -2167,13 +2167,13 @@ inline flatbuffers::Offset CreateFrame(flatbuffers::FlatBufferBuilder &_f struct PointFrame : private flatbuffers::Table { int32_t frameIndex() const { return GetField(4, 0); } uint8_t tween() const { return GetField(6, 1); } - const Position *postion() const { return GetStruct(8); } + const Position *position() const { return GetStruct(8); } const EasingData *easingData() const { return GetPointer(10); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4 /* frameIndex */) && VerifyField(verifier, 6 /* tween */) && - VerifyField(verifier, 8 /* postion */) && + VerifyField(verifier, 8 /* position */) && VerifyField(verifier, 10 /* easingData */) && verifier.VerifyTable(easingData()) && verifier.EndTable(); @@ -2185,7 +2185,7 @@ struct PointFrameBuilder { flatbuffers::uoffset_t start_; void add_frameIndex(int32_t frameIndex) { fbb_.AddElement(4, frameIndex, 0); } void add_tween(uint8_t tween) { fbb_.AddElement(6, tween, 1); } - void add_postion(const Position *postion) { fbb_.AddStruct(8, postion); } + void add_postion(const Position *position) { fbb_.AddStruct(8, position); } void add_easingData(flatbuffers::Offset easingData) { fbb_.AddOffset(10, easingData); } PointFrameBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } PointFrameBuilder &operator=(const PointFrameBuilder &); @@ -2198,11 +2198,11 @@ struct PointFrameBuilder { inline flatbuffers::Offset CreatePointFrame(flatbuffers::FlatBufferBuilder &_fbb, int32_t frameIndex = 0, uint8_t tween = 1, - const Position *postion = 0, + const Position *position = 0, flatbuffers::Offset easingData = 0) { PointFrameBuilder builder_(_fbb); builder_.add_easingData(easingData); - builder_.add_postion(postion); + builder_.add_postion(position); builder_.add_frameIndex(frameIndex); builder_.add_tween(tween); return builder_.Finish(); diff --git a/cocos/editor-support/spine/Atlas.c b/cocos/editor-support/spine/Atlas.c index 8b3eabed9f..6cba85a924 100644 --- a/cocos/editor-support/spine/Atlas.c +++ b/cocos/editor-support/spine/Atlas.c @@ -92,7 +92,7 @@ static int readLine (const char** begin, const char* end, Str* str) { return 1; } -/* Moves str->begin past the first occurence of c. Returns 0 on failure. */ +/* Moves str->begin past the first occurrence of c. Returns 0 on failure. */ static int beginPast (Str* str, char c) { const char* begin = str->begin; while (1) { diff --git a/cocos/network/HttpResponse.h b/cocos/network/HttpResponse.h index 2eeff51fe9..a4d16ca721 100644 --- a/cocos/network/HttpResponse.h +++ b/cocos/network/HttpResponse.h @@ -89,7 +89,7 @@ public: /** * Get the corresponding HttpRequest object which leads to this response. - * There's no paired setter for it, because it's already setted in class constructor + * There's no paired setter for it, because it's already set in class constructor * @return HttpRequest* the corresponding HttpRequest object which leads to this response. */ inline HttpRequest* getHttpRequest() const diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxReflectionHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxReflectionHelper.java index a1c9f566d8..3220b163e5 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxReflectionHelper.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxReflectionHelper.java @@ -37,7 +37,7 @@ public class Cocos2dxReflectionHelper { Log.e("error", "can not find " + constantName + " in " + aClass.getName()); } catch (IllegalAccessException e) { - Log.e("error", constantName + " is not accessable"); + Log.e("error", constantName + " is not accessible"); } catch (IllegalArgumentException e) { Log.e("error", "arguments error when get " + constantName); diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index a3008f1152..9d12d05b0f 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -568,7 +568,7 @@ bool GLProgram::link() // Calling glGetProgramiv(...GL_LINK_STATUS...) will force linking of the program at this moment. // Otherwise, they might be linked when they are used for the first time. (I guess this depends on the driver implementation) // So it might slow down the "booting" process on certain devices. But, on the other hand it is important to know if the shader - // linked succesfully. Some shaders might be downloaded in runtime so, release version should have this check. + // linked successfully. Some shaders might be downloaded in runtime so, release version should have this check. // For more info, see Github issue #16231 glGetProgramiv(_program, GL_LINK_STATUS, &status); diff --git a/cocos/renderer/ccShader_3D_PositionTex.vert b/cocos/renderer/ccShader_3D_PositionTex.vert index 387810bb54..38011decb6 100644 --- a/cocos/renderer/ccShader_3D_PositionTex.vert +++ b/cocos/renderer/ccShader_3D_PositionTex.vert @@ -67,11 +67,11 @@ vec4 getPosition() } vec4 _skinnedPosition; - vec4 postion = vec4(a_position, 1.0); - _skinnedPosition.x = dot(postion, matrixPalette1); - _skinnedPosition.y = dot(postion, matrixPalette2); - _skinnedPosition.z = dot(postion, matrixPalette3); - _skinnedPosition.w = postion.w; + vec4 position = vec4(a_position, 1.0); + _skinnedPosition.x = dot(position, matrixPalette1); + _skinnedPosition.y = dot(position, matrixPalette2); + _skinnedPosition.z = dot(position, matrixPalette3); + _skinnedPosition.w = position.w; return _skinnedPosition; } diff --git a/cocos/scripting/js-bindings/script/debugger/actors/object.js b/cocos/scripting/js-bindings/script/debugger/actors/object.js index dd2c7a7f95..f3f64a704f 100644 --- a/cocos/scripting/js-bindings/script/debugger/actors/object.js +++ b/cocos/scripting/js-bindings/script/debugger/actors/object.js @@ -1170,7 +1170,7 @@ DebuggerServer.ObjectActorPreviewers = { * The thread actor to use to create a value grip. * @return object|null * An object with one property, "value", which holds the value grip that - * represents the given object. Null is returned if we cant preview the + * represents the given object. Null is returned if we can't preview the * object. */ function genericObjectPreviewer(className, classObj, obj, hooks) { diff --git a/cocos/scripting/js-bindings/script/debugger/webconsole/utils.js b/cocos/scripting/js-bindings/script/debugger/webconsole/utils.js index f43e0cfc80..4c85cbea92 100644 --- a/cocos/scripting/js-bindings/script/debugger/webconsole/utils.js +++ b/cocos/scripting/js-bindings/script/debugger/webconsole/utils.js @@ -452,7 +452,7 @@ var WebConsoleUtils = { /** * Helper function to deduce the name of the provided function. * - * @param funtion aFunction + * @param function aFunction * The function whose name will be returned. * @return string * Function name. @@ -1527,7 +1527,7 @@ var WebConsoleCommands = { /** * Register a new command. - * @param {string} name The command name (exemple: "$") + * @param {string} name The command name (example: "$") * @param {(function|object)} command The command to register. * It can be a function so the command is a function (like "$()"), * or it can also be a property descriptor to describe a getter / value (like diff --git a/cocos/scripting/js-bindings/script/jsb_boot.js b/cocos/scripting/js-bindings/script/jsb_boot.js index 2895ef81bc..319734eef4 100644 --- a/cocos/scripting/js-bindings/script/jsb_boot.js +++ b/cocos/scripting/js-bindings/script/jsb_boot.js @@ -1063,7 +1063,7 @@ var _initSys = function () { * @constant * @type {Number} */ - sys.LANGUAGE_UNKNOWN = "unkonwn"; + sys.LANGUAGE_UNKNOWN = "unknown"; /** * @memberof cc.sys diff --git a/cocos/scripting/js-bindings/script/jsb_cocos2d.js b/cocos/scripting/js-bindings/script/jsb_cocos2d.js index c3caec746f..4a1500b2cb 100644 --- a/cocos/scripting/js-bindings/script/jsb_cocos2d.js +++ b/cocos/scripting/js-bindings/script/jsb_cocos2d.js @@ -615,7 +615,7 @@ cc._reuse_color4b = {r:255, g:255, b:255, a:255 }; // -// Basic sturcture : Point +// Basic structure : Point // cc.p = function( x, y ) { @@ -948,7 +948,7 @@ cc._g = function( x, y ) }; // -// Basic sturcture : Size +// Basic structure : Size // cc.size = function(w,h) { @@ -1089,7 +1089,7 @@ cc.RectZero = function () { return cc.rect(0, 0, 0, 0); }; -// Basic sturcture : Color +// Basic structure : Color cc.Color = function (r, g, b, a) { this.r = r || 0; this.g = g || 0; @@ -1101,7 +1101,7 @@ cc.Color = function (r, g, b, a) { * Generate a color object based on multiple forms of parameters * @example * - * // 1. All channels seperately as parameters + * // 1. All channels separately as parameters * var color1 = cc.color(255, 255, 255, 255); * * // 2. Convert a hex string to a color @@ -1695,7 +1695,7 @@ cc.arrayVerifyType = function (arr, type) { }; /** - * Searches for the first occurance of object and removes it. If object is not found the function has no effect. + * Searches for the first occurrence of object and removes it. If object is not found the function has no effect. * @function * @param {Array} arr Source Array * @param {*} delObj remove object @@ -2601,7 +2601,7 @@ cc.MenuItem.prototype.setCallback = function (callback, target) { }; // -// MenuItemImage support sprite frame name as paramter +// MenuItemImage support sprite frame name as parameter // var _p = cc.MenuItemImage.prototype; _p._setNormalSpriteFrame = _p.setNormalSpriteFrame; diff --git a/cocos/scripting/js-bindings/script/jsb_common.js b/cocos/scripting/js-bindings/script/jsb_common.js index 5b779f07f2..df884c41fc 100644 --- a/cocos/scripting/js-bindings/script/jsb_common.js +++ b/cocos/scripting/js-bindings/script/jsb_common.js @@ -105,7 +105,7 @@ cc.KEY = { '-':109, 'numdel':110, '/':111, - f1:112, //f1-f12 dont work on ie + f1:112, //f1-f12 don't work on ie f2:113, f3:114, f4:115, @@ -139,7 +139,7 @@ cc.KEY = { closebracket:221, quote:222, - // gamepad controll + // gamepad control dpadLeft:1000, dpadRight:1001, dpadUp:1003, diff --git a/cocos/scripting/lua-bindings/auto/api/LayoutComponent.lua b/cocos/scripting/lua-bindings/auto/api/LayoutComponent.lua index 51e08fff3d..7261a71ccc 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayoutComponent.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayoutComponent.lua @@ -270,7 +270,7 @@ -------------------------------- -- Percent content size is used to adapt node's content size based on parent's content size.
--- If set to true then node's content size will be changed based on the value setted by @see setPercentContentSize
+-- If set to true then node's content size will be changed based on the value set by @see setPercentContentSize
-- param isUsed True to enable percent content size, false otherwise. -- @function [parent=#LayoutComponent] setUsingPercentContentSize -- @param self diff --git a/cocos/ui/UILayoutComponent.h b/cocos/ui/UILayoutComponent.h index 51bb2a5a69..e0a49c1ef3 100644 --- a/cocos/ui/UILayoutComponent.h +++ b/cocos/ui/UILayoutComponent.h @@ -95,7 +95,7 @@ namespace ui { /** * Percent content size is used to adapt node's content size based on parent's content size. - * If set to true then node's content size will be changed based on the value setted by @see setPercentContentSize + * If set to true then node's content size will be changed based on the value set by @see setPercentContentSize *@param isUsed True to enable percent content size, false otherwise. */ void setUsingPercentContentSize(bool isUsed); diff --git a/cocos/ui/UIPageView.h b/cocos/ui/UIPageView.h index b8a3b56ef3..330d5c381f 100644 --- a/cocos/ui/UIPageView.h +++ b/cocos/ui/UIPageView.h @@ -171,7 +171,7 @@ public: * Scroll to a page with a given index and with a given scroll time. * * @param idx A given index in the PageView. Index start from 0 to pageCount -1. - * @param time Scroll time must be >= 0. Otherwise last setted scroll time will be used. + * @param time Scroll time must be >= 0. Otherwise last set scroll time will be used. */ void scrollToPage(ssize_t idx, float time); @@ -186,7 +186,7 @@ public: * Scroll to a item with a given index and with a given scroll time. * * @param idx A given index in the PageView. Index start from 0 to pageCount -1. - * @param time Scroll time must be >= 0. Otherwise last setted scrolltime will be used. + * @param time Scroll time must be >= 0. Otherwise last set scrolltime will be used. */ void scrollToItem(ssize_t idx, float time);