From 8f632365c3a128fa25a778b95641ab93f898e8b8 Mon Sep 17 00:00:00 2001 From: mogemimi Date: Tue, 3 Nov 2015 04:31:17 +0900 Subject: [PATCH] Fix typos in documentation --- .../js-bindings/manual/ScriptingCore.h | 2 +- .../js-bindings/manual/js_bindings_config.h | 4 ++-- .../manual/spidermonkey_specifics.h | 2 +- .../lua-bindings/manual/CCLuaBridge.h | 4 ++-- .../lua-bindings/manual/CCLuaEngine.h | 8 ++++---- .../scripting/lua-bindings/manual/CCLuaStack.h | 10 +++++----- .../scripting/lua-bindings/manual/CCLuaValue.h | 2 +- .../lua-bindings/manual/cocos2d/LuaOpengl.h | 2 +- .../manual/cocos2d/LuaScriptHandlerMgr.h | 6 +++--- .../manual/cocosbuilder/CCBProxy.h | 4 ++-- .../lua_cocos2dx_cocosdenshion_manual.h | 2 +- .../platform/android/CCLuaJavaBridge.cpp | 2 +- .../scripting/lua-bindings/manual/tolua_fix.h | 18 +++++++++--------- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.h b/cocos/scripting/js-bindings/manual/ScriptingCore.h index 3049182f92..3ead7224c8 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.h +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.h @@ -455,7 +455,7 @@ public: void debugProcessInput(const std::string& str); /**@~english * Enable the debug environment, mozilla Firefox's remote debugger or Code IDE can connect to it. - * @param port @~english The port to connect with the debug enviroment, default value is 5086 + * @param port @~english The port to connect with the debug environment, default value is 5086 */ void enableDebugger(unsigned int port = 5086); /**@~english diff --git a/cocos/scripting/js-bindings/manual/js_bindings_config.h b/cocos/scripting/js-bindings/manual/js_bindings_config.h index 4b85ec4197..a9d8577c56 100644 --- a/cocos/scripting/js-bindings/manual/js_bindings_config.h +++ b/cocos/scripting/js-bindings/manual/js_bindings_config.h @@ -28,7 +28,7 @@ /** @def JSB_ASSERT_ON_FAIL Whether or not to assert when the arguments or conversions are incorrect. - It is recommened to turn it off in Release mode. + It is recommended to turn it off in Release mode. */ #ifndef JSB_ASSERT_ON_FAIL #define JSB_ASSERT_ON_FAIL 0 @@ -77,7 +77,7 @@ /** @def JSB_REPRESENT_LONGLONG_AS_STR When JSB_REPRESENT_LONGLONG_AS_STR is defined, the long long will be represented as JS strings. - Otherwise they will be represented as an array of two intengers. + Otherwise they will be represented as an array of two integers. It is needed to to use an special representation since there are no 64-bit integers in JS. Representing the long long as string could be a bit slower, but it is easier to debug from JS. Enabled by default. diff --git a/cocos/scripting/js-bindings/manual/spidermonkey_specifics.h b/cocos/scripting/js-bindings/manual/spidermonkey_specifics.h index a196189731..90adaadc81 100644 --- a/cocos/scripting/js-bindings/manual/spidermonkey_specifics.h +++ b/cocos/scripting/js-bindings/manual/spidermonkey_specifics.h @@ -52,7 +52,7 @@ public: static const char* s_name() { // return id unique for DERIVED - // ALWAYS VALID BUT STRING, NOT INT - BUT VALID AND CROSS-PLATFORM/CROSS-VERSION COMPATBLE + // ALWAYS VALID BUT STRING, NOT INT - BUT VALID AND CROSS-PLATFORM/CROSS-VERSION COMPATIBLE // AS FAR AS YOU KEEP THE CLASS NAME return typeid( DERIVED ).name(); } diff --git a/cocos/scripting/lua-bindings/manual/CCLuaBridge.h b/cocos/scripting/lua-bindings/manual/CCLuaBridge.h index 85fb49719e..cc6c036a0c 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaBridge.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaBridge.h @@ -90,9 +90,9 @@ public: /** * - * The retain count woulde be reduced by 1 corresponding to functionId in the `lua_bridge_function_id_retain` table if it could be found. + * The retain count would be reduced by 1 corresponding to functionId in the `lua_bridge_function_id_retain` table if it could be found. * If `lua_bridge_function_id` table or `lua_bridge_function_id_retain` aren't found, it would return 0. - * If the vaule of retain count is 0 after reducing, it would update the `lua_bridge_function_id_retain` table and `lua_bridge_function_id_retain` table to remove the reference corresponding to this functionId + * If the value of retain count is 0 after reducing, it would update the `lua_bridge_function_id_retain` table and `lua_bridge_function_id_retain` table to remove the reference corresponding to this functionId * * @param functionId the value used to search the `lua_bridge_function_id` table and `lua_bridge_function_id` table. * @return the retain count or 0. diff --git a/cocos/scripting/lua-bindings/manual/CCLuaEngine.h b/cocos/scripting/lua-bindings/manual/CCLuaEngine.h index 1872f43e3c..d0e7e1370d 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaEngine.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaEngine.h @@ -66,7 +66,7 @@ public: CC_DEPRECATED_ATTRIBUTE static LuaEngine* defaultEngine(void) { return LuaEngine::getInstance(); } /** - * Destrutor of LuaEngine. + * Destructor of LuaEngine. */ virtual ~LuaEngine(void); @@ -105,7 +105,7 @@ public: /** * Reload script code corresponding to moduleFileName. - * If value of package["loaded"][moduleFileName] is existed, it would set the vaule nil.Then,it calls executeString function. + * If value of package["loaded"][moduleFileName] is existed, it would set the value nil.Then,it calls executeString function. * * @param moduleFileName String object holding the filename of the script file that is to be executed. * @return 0 if the string is executed correctly or other if the string is executed wrongly. @@ -126,14 +126,14 @@ public: /** * Remove Lua function reference by nHandler by setting toluafix_refid_function_mapping[nHandle] nil. * - * @param nHandler the function reference index to find the correspoinding Lua function pointer. + * @param nHandler the function reference index to find the corresponding Lua function pointer. */ virtual void removeScriptHandler(int nHandler) override; /** * Reallocate Lua function reference index to the Lua function pointer to add reference. * - * @param nHandler the function reference index to find the correspoinding Lua function pointer. + * @param nHandler the function reference index to find the corresponding Lua function pointer. */ virtual int reallocateScriptHandler(int nHandler) override; diff --git a/cocos/scripting/lua-bindings/manual/CCLuaStack.h b/cocos/scripting/lua-bindings/manual/CCLuaStack.h index b144c5e92f..c69b4e6cea 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaStack.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaStack.h @@ -87,10 +87,10 @@ public: /** * Reload script code corresponding to moduleFileName. - * If value of package["loaded"][moduleFileName] is existed, it would set the vaule nil.Then,it calls executeString function. + * If value of package["loaded"][moduleFileName] is existed, it would set the value nil.Then,it calls executeString function. * * @param moduleFileName String object holding the filename of the script file that is to be executed. - * @return 0 if the string is excuted correctly or other if the string is excuted wrongly. + * @return 0 if the string is executed correctly or other if the string is executed wrongly. */ virtual int reload(const char* moduleFileName); @@ -108,14 +108,14 @@ public: /** * Remove Lua function reference by nHandler by setting toluafix_refid_function_mapping[nHandle] nil. * - * @param nHandler the function reference index to find the correspoinding Lua function pointer. + * @param nHandler the function reference index to find the corresponding Lua function pointer. */ virtual void removeScriptHandler(int nHandler); /** * Reallocate Lua function reference index to the Lua function pointer to add reference. * - * @param nHandler the function reference index to find the correspoinding Lua function pointer. + * @param nHandler the function reference index to find the corresponding Lua function pointer. */ virtual int reallocateScriptHandler(int nHandler); @@ -150,7 +150,7 @@ public: virtual void clean(void); /** - * Pushes a integer number with value intVaule onto the stack. + * Pushes a integer number with value intValue onto the stack. * * @param intValue a integer number. */ diff --git a/cocos/scripting/lua-bindings/manual/CCLuaValue.h b/cocos/scripting/lua-bindings/manual/CCLuaValue.h index a70065c111..1110334cf4 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaValue.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaValue.h @@ -171,7 +171,7 @@ public: /** - * Default constuctor of LuaValue. + * Default constructor of LuaValue. * Set the default value for _type(LuaValueTypeInt) and _ccobjectType(nullptr),and init the _field. */ LuaValue(void) diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h b/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h index 1241b6c8d3..c0f18cc434 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h +++ b/cocos/scripting/lua-bindings/manual/cocos2d/LuaOpengl.h @@ -47,7 +47,7 @@ class GLNode:public cocos2d::Node { public: /** - * Destrutor. + * Destructor. * * @lua NA * @js NA diff --git a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h index 1aa9869fad..225ca43f42 100644 --- a/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h +++ b/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h @@ -80,13 +80,13 @@ class LuaCallFunc:public cocos2d::CallFuncN { public: /** - * Default construtor. + * Default constructor. */ LuaCallFunc():_functionLua(nullptr) {} /** - * Destrutor. + * Destructor. */ virtual ~LuaCallFunc() {} @@ -113,7 +113,7 @@ protected: /** * In order to reduce the coupling of lua script engine and native c++ engine. - * In the current mechanism, for the class derived from the Ref, we constuct a mapping relationship among c++ Ref object, HandlerType and the reference index corresponding to the pointer of Lua function. Then, using the ScriptHandlerMgr to manager uniformly. + * In the current mechanism, for the class derived from the Ref, we construct a mapping relationship among c++ Ref object, HandlerType and the reference index corresponding to the pointer of Lua function. Then, using the ScriptHandlerMgr to manager uniformly. * By this mechanism, when native c++ Ref object wants to call the Lua function, we didn't insert the processing code in the native c++ class. */ class ScriptHandlerMgr diff --git a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h b/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h index edaa9074f7..fe35312f20 100644 --- a/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h +++ b/cocos/scripting/lua-bindings/manual/cocosbuilder/CCBProxy.h @@ -49,7 +49,7 @@ public: CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(CCBProxy, create); /** - * Createa a CCBReader object. + * Create a CCBReader object. * * @return a CCBReader object. * @@ -71,7 +71,7 @@ public: /** * Get the true type name of pNode. - * By using the dynamic_cast function, we coulde get the true type name of pNode. + * By using the dynamic_cast function, we could get the true type name of pNode. * * @param pNode the Node object used to query. * @return a string pointer point to the true type name otherwise return "No Support". diff --git a/cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h b/cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h index acd2f1ecab..dc4f412b0d 100644 --- a/cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h +++ b/cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h @@ -40,7 +40,7 @@ extern "C" { /** * Call this function can import the lua bindings for the cocosdenshion module. * After registering, we could call the related cocosdenshion code conveniently in the lua.eg,.cc.SimpleAudioEngine:getInstance():stopAllEffects(). - * In current mechanism, most bindings function of SimpleAudioEngine are wrapped in the Lua script file named AudioEngine.lua by more friednly modes. + * In current mechanism, most bindings function of SimpleAudioEngine are wrapped in the Lua script file named AudioEngine.lua by more friendly modes. * If you don't want to use the cocosdenshion module in the lua, you only don't call this registering function. * If you don't register the cocosdenshion module, the package size would become smaller . * The current mechanism,this registering function is called in the lua_module_register.h diff --git a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp index 8a8c7ce36c..678406053a 100644 --- a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp +++ b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp @@ -348,7 +348,7 @@ int LuaJavaBridge::callJavaStaticMethod(lua_State *L) return 1 + call.pushReturnValue(L); } -// increase lua function refernece counter, return counter +// increase lua function reference counter, return counter int LuaJavaBridge::retainLuaFunctionById(int functionId) { lua_State *L = s_luaState; diff --git a/cocos/scripting/lua-bindings/manual/tolua_fix.h b/cocos/scripting/lua-bindings/manual/tolua_fix.h index ddd0b6563a..d098f226db 100644 --- a/cocos/scripting/lua-bindings/manual/tolua_fix.h +++ b/cocos/scripting/lua-bindings/manual/tolua_fix.h @@ -54,13 +54,13 @@ TOLUA_API int toluafix_pushusertype_ccobject(lua_State* L, TOLUA_API int toluafix_remove_ccobject_by_refid(lua_State* L, int refid); /** - * Get the reference id of the Lua function at the given accepteable index lo of stack. + * Get the reference id of the Lua function at the given acceptable index lo of stack. * Meanwhile add reference about the Lua function through the toluafix_refid_function_mapping table in the Lua registry. * * @param L the current lua_State. - * @param lo the given accepteable index lo of stack. + * @param lo the given acceptable index lo of stack. * @param def useless. - * @return 0 if the type of value at the given accepteable index lo of stack is not LUA_TFUNCTION; otherwise return the reference id. + * @return 0 if the type of value at the given acceptable index lo of stack is not LUA_TFUNCTION; otherwise return the reference id. * @lua NA * @js NA */ @@ -70,7 +70,7 @@ TOLUA_API int toluafix_ref_function(lua_State* L, int lo, int def); * Push the Lua function found by the refid in the toluafix_refid_function_mapping table in the Lua registry on the top index of the current stack. * * @param L the current lua_State. - * @param refid referenc id corresponding to the Lua function. + * @param refid reference id corresponding to the Lua function. * @lua NA * @js NA */ @@ -80,7 +80,7 @@ TOLUA_API void toluafix_get_function_by_refid(lua_State* L, int refid); * Remove the reference of the Lua function corresponding to the refid in the toluafix_refid_function_mapping table in the Lua registry. * * @param L the current lua_State. - * @param refid referenc id corresponding to the Lua function. + * @param refid reference id corresponding to the Lua function. * @lua NA * @js NA */ @@ -90,10 +90,10 @@ TOLUA_API void toluafix_remove_function_by_refid(lua_State* L, int refid); * Verify the value at the given acceptable index is a function or not. * * @param L the current lua_State. - * @param lo the given accepteable index lo of stack. + * @param lo the given acceptable index lo of stack. * @param type useless. * @param def useless. - * @param err if triggger the error, record the error message to err. + * @param err if trigger the error, record the error message to err. * @return 1 if the value at the given acceptable index is a function, otherwise return 0. * @lua NA * @js NA @@ -108,10 +108,10 @@ TOLUA_API int toluafix_totable(lua_State* L, int lo, int def); * Verify the value at the given acceptable index is a table or not. * * @param L the current lua_State. - * @param lo the given accepteable index lo of stack. + * @param lo the given acceptable index lo of stack. * @param type useless. * @param def whether has the default value. - * @param err if triggger the error, record the error message to err. + * @param err if trigger the error, record the error message to err. * @return 1 if the value at the given acceptable index is a table or have def value is not 0, otherwise return 0. * @lua NA * @js NA