diff --git a/native/cocos/2d/CCAction.h b/native/cocos/2d/CCAction.h index b3514b4d44..99647cb498 100644 --- a/native/cocos/2d/CCAction.h +++ b/native/cocos/2d/CCAction.h @@ -256,7 +256,7 @@ public: * * @return The action speed. */ - inline float getSpeed(void) const { return _speed; } + inline float getSpeed() const { return _speed; } /** Alter the speed of the inner function in runtime. * * @param speed Alter the speed of the inner function in runtime. @@ -293,7 +293,7 @@ public: CC_CONSTRUCTOR_ACCESS: Speed(); - virtual ~Speed(void); + virtual ~Speed(); /** Initializes the action. */ bool initWithAction(ActionInterval *action, float speed); diff --git a/native/cocos/2d/CCActionEase.cpp b/native/cocos/2d/CCActionEase.cpp index 8aef31112f..87b8536b05 100644 --- a/native/cocos/2d/CCActionEase.cpp +++ b/native/cocos/2d/CCActionEase.cpp @@ -62,7 +62,7 @@ bool ActionEase::initWithAction(ActionInterval *action) return false; } -ActionEase::~ActionEase(void) +ActionEase::~ActionEase() { CC_SAFE_RELEASE(_inner); } @@ -79,7 +79,7 @@ void ActionEase::startWithTarget(Node *target) } } -void ActionEase::stop(void) +void ActionEase::stop() { if (_inner) { _inner->stop(); @@ -418,7 +418,7 @@ void EaseSineOut::update(float time) _inner->update(tweenfunc::sineEaseOut(time)); } -ActionEase* EaseSineOut::reverse(void) const +ActionEase* EaseSineOut::reverse() const { return EaseSineIn::create(_inner->reverse()); } diff --git a/native/cocos/2d/CCActionGrid.cpp b/native/cocos/2d/CCActionGrid.cpp index bdbb25a223..f4d60aa7c0 100644 --- a/native/cocos/2d/CCActionGrid.cpp +++ b/native/cocos/2d/CCActionGrid.cpp @@ -131,7 +131,7 @@ Rect Grid3DAction::getGridRect() const // implementation of TiledGrid3DAction -GridBase* TiledGrid3DAction::getGrid(void) +GridBase* TiledGrid3DAction::getGrid() { return TiledGrid3D::create(_gridSize, _gridNodeTarget->getGridRect()); } diff --git a/native/cocos/2d/CCActionGrid.h b/native/cocos/2d/CCActionGrid.h index 3f61faab2d..b02049191d 100644 --- a/native/cocos/2d/CCActionGrid.h +++ b/native/cocos/2d/CCActionGrid.h @@ -207,7 +207,7 @@ public: @brief Get the value of amplitude rate. @return the value of amplitude rate. */ - inline float getRate(void) const { return _rate; } + inline float getRate() const { return _rate; } /** @brief Set the value of amplitude rate. @param rate Specify the value of amplitude rate. diff --git a/native/cocos/2d/CCActionInterval.cpp b/native/cocos/2d/CCActionInterval.cpp index 3a1863dbc1..25c1e808a6 100644 --- a/native/cocos/2d/CCActionInterval.cpp +++ b/native/cocos/2d/CCActionInterval.cpp @@ -47,7 +47,7 @@ class ExtraAction : public FiniteTimeAction public: static ExtraAction* create(); virtual ExtraAction* clone() const; - virtual ExtraAction* reverse(void) const; + virtual ExtraAction* reverse() const; virtual void update(float time); virtual void step(float dt); }; @@ -329,7 +329,7 @@ void Sequence::startWithTarget(Node *target) _last = -1; } -void Sequence::stop(void) +void Sequence::stop() { // Issue #1305 if( _last != - 1 && _actions[_last]) @@ -455,13 +455,13 @@ bool Repeat::initWithAction(FiniteTimeAction *action, unsigned int times) return false; } -Repeat* Repeat::clone(void) const +Repeat* Repeat::clone() const { // no copy constructor return Repeat::create(_innerAction->clone(), _times); } -Repeat::~Repeat(void) +Repeat::~Repeat() { CC_SAFE_RELEASE(_innerAction); } @@ -474,7 +474,7 @@ void Repeat::startWithTarget(Node *target) _innerAction->startWithTarget(target); } -void Repeat::stop(void) +void Repeat::stop() { _innerAction->stop(); ActionInterval::stop(); @@ -527,7 +527,7 @@ void Repeat::update(float dt) } } -bool Repeat::isDone(void) const +bool Repeat::isDone() const { return _total == _times; } @@ -750,7 +750,7 @@ bool Spawn::initWithTwoActions(FiniteTimeAction *action1, FiniteTimeAction *acti return ret; } -Spawn* Spawn::clone(void) const +Spawn* Spawn::clone() const { // no copy constructor if (_one && _two) { @@ -767,7 +767,7 @@ Spawn::Spawn() } -Spawn::~Spawn(void) +Spawn::~Spawn() { CC_SAFE_RELEASE(_one); CC_SAFE_RELEASE(_two); @@ -789,7 +789,7 @@ void Spawn::startWithTarget(Node *target) _two->startWithTarget(target); } -void Spawn::stop(void) +void Spawn::stop() { if (_one) { _one->stop(); @@ -864,7 +864,7 @@ bool RotateTo::initWithDuration(float duration, float dstAngleX, float dstAngleY return false; } -RotateTo* RotateTo::clone(void) const +RotateTo* RotateTo::clone() const { // no copy constructor return RotateTo::create(_duration, _dstAngle.x, _dstAngle.y); @@ -1772,7 +1772,7 @@ void Blink::startWithTarget(Node *target) _originalState = target->isVisible(); } -Blink* Blink::clone(void) const +Blink* Blink::clone() const { // no copy constructor return Blink::create(_duration, _times); @@ -2176,7 +2176,7 @@ void ReverseTime::startWithTarget(Node *target) _other->startWithTarget(target); } -void ReverseTime::stop(void) +void ReverseTime::stop() { _other->stop(); ActionInterval::stop(); diff --git a/native/cocos/2d/CCActionInterval.h b/native/cocos/2d/CCActionInterval.h index 985cb5812a..3946d42dbd 100644 --- a/native/cocos/2d/CCActionInterval.h +++ b/native/cocos/2d/CCActionInterval.h @@ -73,7 +73,7 @@ public: * * @return The seconds had elapsed since the actions started to run. */ - inline float getElapsed(void) { return _elapsed; } + inline float getElapsed() { return _elapsed; } /** Sets the amplitude rate, extension in GridAction * @@ -85,12 +85,12 @@ public: * * @return The amplitude rate. */ - float getAmplitudeRate(void); + float getAmplitudeRate(); // // Overrides // - virtual bool isDone(void) const override; + virtual bool isDone() const override; /** * @param dt in seconds */ @@ -183,7 +183,7 @@ public: virtual Sequence* clone() const override; virtual Sequence* reverse() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param t In seconds. */ @@ -250,12 +250,12 @@ public: virtual Repeat* clone() const override; virtual Repeat* reverse() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param dt In seconds. */ virtual void update(float dt) override; - virtual bool isDone(void) const override; + virtual bool isDone() const override; CC_CONSTRUCTOR_ACCESS: Repeat() {} @@ -318,13 +318,13 @@ public: // Overrides // virtual RepeatForever* clone() const override; - virtual RepeatForever* reverse(void) const override; + virtual RepeatForever* reverse() const override; virtual void startWithTarget(Node* target) override; /** * @param dt In seconds. */ virtual void step(float dt) override; - virtual bool isDone(void) const override; + virtual bool isDone() const override; CC_CONSTRUCTOR_ACCESS: RepeatForever() @@ -407,9 +407,9 @@ public: // Overrides // virtual Spawn* clone() const override; - virtual Spawn* reverse(void) const override; + virtual Spawn* reverse() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param time In seconds. */ @@ -543,7 +543,7 @@ public: // Override // virtual RotateBy* clone() const override; - virtual RotateBy* reverse(void) const override; + virtual RotateBy* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -602,7 +602,7 @@ public: // Overrides // virtual MoveBy* clone() const override; - virtual MoveBy* reverse(void) const override; + virtual MoveBy* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time in seconds @@ -699,7 +699,7 @@ public: // Overrides // virtual SkewTo* clone() const override; - virtual SkewTo* reverse(void) const override; + virtual SkewTo* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -749,7 +749,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual SkewBy* clone() const override; - virtual SkewBy* reverse(void) const override; + virtual SkewBy* reverse() const override; CC_CONSTRUCTOR_ACCESS: SkewBy() {} @@ -783,7 +783,7 @@ public: // Overrides // virtual JumpBy* clone() const override; - virtual JumpBy* reverse(void) const override; + virtual JumpBy* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -832,7 +832,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual JumpTo* clone() const override; - virtual JumpTo* reverse(void) const override; + virtual JumpTo* reverse() const override; CC_CONSTRUCTOR_ACCESS: JumpTo() {} @@ -884,7 +884,7 @@ public: // Overrides // virtual BezierBy* clone() const override; - virtual BezierBy* reverse(void) const override; + virtual BezierBy* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -934,7 +934,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual BezierTo* clone() const override; - virtual BezierTo* reverse(void) const override; + virtual BezierTo* reverse() const override; CC_CONSTRUCTOR_ACCESS: BezierTo() {} @@ -989,7 +989,7 @@ public: // Overrides // virtual ScaleTo* clone() const override; - virtual ScaleTo* reverse(void) const override; + virtual ScaleTo* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -1072,7 +1072,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual ScaleBy* clone() const override; - virtual ScaleBy* reverse(void) const override; + virtual ScaleBy* reverse() const override; CC_CONSTRUCTOR_ACCESS: ScaleBy() {} @@ -1146,7 +1146,7 @@ public: // Overrides // virtual FadeTo* clone() const override; - virtual FadeTo* reverse(void) const override; + virtual FadeTo* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -1191,7 +1191,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual FadeIn* clone() const override; - virtual FadeTo* reverse(void) const override; + virtual FadeTo* reverse() const override; /** * @js NA @@ -1225,7 +1225,7 @@ public: // virtual void startWithTarget(Node *target) override; virtual FadeOut* clone() const override; - virtual FadeTo* reverse(void) const override; + virtual FadeTo* reverse() const override; /** * @js NA @@ -1269,7 +1269,7 @@ public: // Overrides // virtual TintTo* clone() const override; - virtual TintTo* reverse(void) const override; + virtual TintTo* reverse() const override; virtual void startWithTarget(Node *target) override; /** * @param time In seconds. @@ -1394,7 +1394,7 @@ public: virtual ReverseTime* reverse() const override; virtual ReverseTime* clone() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param time In seconds. */ @@ -1402,7 +1402,7 @@ public: CC_CONSTRUCTOR_ACCESS: ReverseTime(); - virtual ~ReverseTime(void); + virtual ~ReverseTime(); /** initializes the action */ bool initWithAction(FiniteTimeAction *action); @@ -1451,7 +1451,7 @@ public: virtual Animate* clone() const override; virtual Animate* reverse() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param t In seconds. */ @@ -1511,7 +1511,7 @@ public: virtual TargetedAction* clone() const override; virtual TargetedAction* reverse() const override; virtual void startWithTarget(Node *target) override; - virtual void stop(void) override; + virtual void stop() override; /** * @param time In seconds. */ diff --git a/native/cocos/2d/CCActionManager.h b/native/cocos/2d/CCActionManager.h index 720195948d..00ddb16c11 100644 --- a/native/cocos/2d/CCActionManager.h +++ b/native/cocos/2d/CCActionManager.h @@ -61,13 +61,13 @@ public: /** * @js ctor */ - ActionManager(void); + ActionManager(); /** * @js NA * @lua NA */ - ~ActionManager(void); + ~ActionManager(); // actions diff --git a/native/cocos/2d/CCActionTiledGrid.cpp b/native/cocos/2d/CCActionTiledGrid.cpp index e53b87f542..0ebe7daf03 100644 --- a/native/cocos/2d/CCActionTiledGrid.cpp +++ b/native/cocos/2d/CCActionTiledGrid.cpp @@ -568,7 +568,7 @@ TurnOffTiles* TurnOffTiles::clone() const return TurnOffTiles::create(_duration, _gridSize, _seed); } -TurnOffTiles::~TurnOffTiles(void) +TurnOffTiles::~TurnOffTiles() { CC_SAFE_DELETE_ARRAY(_tilesOrder); } diff --git a/native/cocos/2d/CCAnimation.cpp b/native/cocos/2d/CCAnimation.cpp index 8b86d17c06..54957f7cc4 100644 --- a/native/cocos/2d/CCAnimation.cpp +++ b/native/cocos/2d/CCAnimation.cpp @@ -155,7 +155,7 @@ Animation::Animation() } -Animation::~Animation(void) +Animation::~Animation() { CCLOGINFO("deallocing Animation: %p", this); } @@ -184,7 +184,7 @@ void Animation::addSpriteFrameWithTexture(Texture2D *pobTexture, const Rect& rec addSpriteFrame(frame); } -float Animation::getDuration(void) const +float Animation::getDuration() const { return _totalDelayUnits * _delayPerUnit; } diff --git a/native/cocos/2d/CCAnimation.h b/native/cocos/2d/CCAnimation.h index 3cd2342861..4a4ffdaeb7 100644 --- a/native/cocos/2d/CCAnimation.h +++ b/native/cocos/2d/CCAnimation.h @@ -169,7 +169,7 @@ public: /** Creates an animation. * @since v0.99.5 */ - static Animation* create(void); + static Animation* create(); /* Creates an animation with an array of SpriteFrame and a delay between frames in seconds. * The frames will be added with one "delay unit". @@ -278,7 +278,7 @@ public: CC_CONSTRUCTOR_ACCESS: Animation(); - virtual ~Animation(void); + virtual ~Animation(); /** Initializes a Animation. */ bool init(); diff --git a/native/cocos/2d/CCAnimationCache.h b/native/cocos/2d/CCAnimationCache.h index d85bbd719f..a38de88729 100644 --- a/native/cocos/2d/CCAnimationCache.h +++ b/native/cocos/2d/CCAnimationCache.h @@ -74,7 +74,7 @@ public: */ static void destroyInstance(); - bool init(void); + bool init(); /** Adds a Animation with a name. * diff --git a/native/cocos/2d/CCAtlasNode.h b/native/cocos/2d/CCAtlasNode.h index 7a6c0d754a..3b3a0a648f 100644 --- a/native/cocos/2d/CCAtlasNode.h +++ b/native/cocos/2d/CCAtlasNode.h @@ -84,7 +84,7 @@ public: virtual void setTexture(Texture2D *texture) override; virtual bool isOpacityModifyRGB() const override; virtual void setOpacityModifyRGB(bool isOpacityModifyRGB) override; - virtual const Color3B& getColor(void) const override; + virtual const Color3B& getColor() const override; virtual void setColor(const Color3B& color) override; virtual void setOpacity(GLubyte opacity) override; /** diff --git a/native/cocos/2d/CCFontFNT.cpp b/native/cocos/2d/CCFontFNT.cpp index aaf8985f36..9862c20762 100644 --- a/native/cocos/2d/CCFontFNT.cpp +++ b/native/cocos/2d/CCFontFNT.cpp @@ -240,7 +240,7 @@ BMFontConfiguration::~BMFontConfiguration() CC_SAFE_DELETE(_characterSet); } -std::string BMFontConfiguration::description(void) const +std::string BMFontConfiguration::description() const { return StringUtils::format( "", diff --git a/native/cocos/2d/CCGrabber.cpp b/native/cocos/2d/CCGrabber.cpp index 0cb68d0330..2a1fe735a8 100644 --- a/native/cocos/2d/CCGrabber.cpp +++ b/native/cocos/2d/CCGrabber.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. NS_CC_BEGIN -Grabber::Grabber(void) +Grabber::Grabber() : _FBO(0) , _oldFBO(0) { diff --git a/native/cocos/2d/CCGrabber.h b/native/cocos/2d/CCGrabber.h index d346705bc8..e83062b72a 100644 --- a/native/cocos/2d/CCGrabber.h +++ b/native/cocos/2d/CCGrabber.h @@ -46,13 +46,13 @@ public: Constructor. * @js ctor */ - Grabber(void); + Grabber(); /** Destructor. * @js NA * @lua NA */ - ~Grabber(void); + ~Grabber(); /**Init the grab structure, will set the texture as the FBO color attachment.*/ void grab(Texture2D *texture); /**Begin capture the screen, which will save the old FBO, clear color, and set the new FBO, clear the background.*/ diff --git a/native/cocos/2d/CCGrid.cpp b/native/cocos/2d/CCGrid.cpp index 1bb2f466d2..426242e79a 100644 --- a/native/cocos/2d/CCGrid.cpp +++ b/native/cocos/2d/CCGrid.cpp @@ -164,7 +164,7 @@ bool GridBase::initWithSize(const Size& gridSize, Texture2D *texture, bool flipp return ret; } -GridBase::~GridBase(void) +GridBase::~GridBase() { CCLOGINFO("deallocing GridBase: %p", this); @@ -215,7 +215,7 @@ void GridBase::setGridRect(const cocos2d::Rect &rect) _gridRect = rect; } -void GridBase::beforeDraw(void) +void GridBase::beforeDraw() { // save projection Director *director = Director::DirectorInstance; @@ -248,17 +248,17 @@ void GridBase::afterDraw(cocos2d::Node *target) afterBlit(); } -void GridBase::blit(void) +void GridBase::blit() { CCASSERT(0, "Subclass should implement it."); } -void GridBase::reuse(void) +void GridBase::reuse() { CCASSERT(0, "Subclass should implement it!"); } -void GridBase::calculateVertexPoints(void) +void GridBase::calculateVertexPoints() { CCASSERT(0, "Subclass should implement it."); } @@ -356,7 +356,7 @@ Grid3D::Grid3D() } -Grid3D::~Grid3D(void) +Grid3D::~Grid3D() { CC_SAFE_FREE(_texCoordinates); CC_SAFE_FREE(_vertices); @@ -397,7 +397,7 @@ void Grid3D::afterBlit() } } -void Grid3D::blit(void) +void Grid3D::blit() { int n = _gridSize.width * _gridSize.height; @@ -418,7 +418,7 @@ void Grid3D::blit(void) glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, _indices); } -void Grid3D::calculateVertexPoints(void) +void Grid3D::calculateVertexPoints() { float width = (float)_texture->getPixelsWide(); float height = (float)_texture->getPixelsHigh(); @@ -528,7 +528,7 @@ void Grid3D::setVertex(const Vec2& pos, const Vec3& vertex) vertArray[index+2] = vertex.z; } -void Grid3D::reuse(void) +void Grid3D::reuse() { if (_reuseGrid > 0) { @@ -548,7 +548,7 @@ TiledGrid3D::TiledGrid3D() } -TiledGrid3D::~TiledGrid3D(void) +TiledGrid3D::~TiledGrid3D() { CC_SAFE_FREE(_texCoordinates); CC_SAFE_FREE(_vertices); @@ -636,7 +636,7 @@ TiledGrid3D* TiledGrid3D::create(const Size& gridSize, Texture2D *texture, bool return ret; } -void TiledGrid3D::blit(void) +void TiledGrid3D::blit() { int n = _gridSize.width * _gridSize.height; @@ -660,7 +660,7 @@ void TiledGrid3D::blit(void) CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6); } -void TiledGrid3D::calculateVertexPoints(void) +void TiledGrid3D::calculateVertexPoints() { float width = (float)_texture->getPixelsWide(); float height = (float)_texture->getPixelsHigh(); @@ -771,7 +771,7 @@ Quad3 TiledGrid3D::getTile(const Vec2& pos) const return ret; } -void TiledGrid3D::reuse(void) +void TiledGrid3D::reuse() { if (_reuseGrid > 0) { diff --git a/native/cocos/2d/CCGrid.h b/native/cocos/2d/CCGrid.h index c46c2a2ad3..e84b296ea7 100644 --- a/native/cocos/2d/CCGrid.h +++ b/native/cocos/2d/CCGrid.h @@ -56,7 +56,7 @@ public: * @js NA * @lua NA */ - virtual ~GridBase(void); + virtual ~GridBase(); /**@{ Init the Grid base. @@ -74,34 +74,34 @@ public: /** @{ Getter and setter of the active state of the grid. */ - inline bool isActive(void) const { return _active; } + inline bool isActive() const { return _active; } void setActive(bool active); /**@}*/ /** Get number of times that the grid will be reused. */ - inline int getReuseGrid(void) const { return _reuseGrid; } + inline int getReuseGrid() const { return _reuseGrid; } /** Set number of times that the grid will be reused. */ inline void setReuseGrid(int reuseGrid) { _reuseGrid = reuseGrid; } /** Size of the grid. */ - inline const Size& getGridSize(void) const { return _gridSize; } + inline const Size& getGridSize() const { return _gridSize; } /**Set the size of the grid.*/ inline void setGridSize(const Size& gridSize) { _gridSize = gridSize; } /** Pixels between the grids. */ - inline const Vec2& getStep(void) const { return _step; } + inline const Vec2& getStep() const { return _step; } /**Get the pixels between the grids.*/ inline void setStep(const Vec2& step) { _step = step; } /** is texture flipped. */ - inline bool isTextureFlipped(void) const { return _isTextureFlipped; } + inline bool isTextureFlipped() const { return _isTextureFlipped; } /**Set the texture flipped or not.*/ void setTextureFlipped(bool flipped); /**@{ Init and reset the status when render effects by using the grid. */ - void beforeDraw(void); + void beforeDraw(); void afterDraw(Node *target); /**@}*/ @@ -114,14 +114,14 @@ public: /**@}*/ /**Interface used to blit the texture with grid to screen.*/ - virtual void blit(void); + virtual void blit(); /**Interface, Reuse the grid vertices.*/ - virtual void reuse(void); + virtual void reuse(); /**Interface, Calculate the vertices used for the blit.*/ - virtual void calculateVertexPoints(void); + virtual void calculateVertexPoints(); /**Change projection to 2D for grabbing.*/ - void set2DProjection(void); + void set2DProjection(); /** * @brief Set the effect grid rect. @@ -171,7 +171,7 @@ public: * @js NA * @lua NA */ - ~Grid3D(void); + ~Grid3D(); /** Returns the vertex at a given position. * @js NA diff --git a/native/cocos/2d/CCLabelAtlas.cpp b/native/cocos/2d/CCLabelAtlas.cpp index a0ee8df519..692d8ab1c9 100644 --- a/native/cocos/2d/CCLabelAtlas.cpp +++ b/native/cocos/2d/CCLabelAtlas.cpp @@ -225,7 +225,7 @@ void LabelAtlas::setString(const std::string &label) _quadsToDraw = len; } -const std::string& LabelAtlas::getString(void) const +const std::string& LabelAtlas::getString() const { return _string; } diff --git a/native/cocos/2d/CCLabelAtlas.h b/native/cocos/2d/CCLabelAtlas.h index 0908c21bca..2faca1d0f8 100644 --- a/native/cocos/2d/CCLabelAtlas.h +++ b/native/cocos/2d/CCLabelAtlas.h @@ -83,7 +83,7 @@ public: bool initWithString(const std::string& string, Texture2D* texture, int itemWidth, int itemHeight, int startCharMap); virtual void setString(const std::string &label) override; - virtual const std::string& getString(void) const override; + virtual const std::string& getString() const override; virtual void updateAtlasValues() override; /** diff --git a/native/cocos/2d/CCMenu.cpp b/native/cocos/2d/CCMenu.cpp index 558c2004ba..91f4ea0be9 100644 --- a/native/cocos/2d/CCMenu.cpp +++ b/native/cocos/2d/CCMenu.cpp @@ -341,7 +341,7 @@ void Menu::alignItemsVerticallyWithPadding(float padding) } } -void Menu::alignItemsHorizontally(void) +void Menu::alignItemsHorizontally() { this->alignItemsHorizontallyWithPadding(kDefaultPadding); } diff --git a/native/cocos/2d/CCMenu.h b/native/cocos/2d/CCMenu.h index c6e206ccc2..bc38f0f3f0 100644 --- a/native/cocos/2d/CCMenu.h +++ b/native/cocos/2d/CCMenu.h @@ -172,7 +172,7 @@ public: virtual void onEnter() override; virtual void onExit() override; virtual void setOpacityModifyRGB(bool bValue) override {CC_UNUSED_PARAM(bValue);} - virtual bool isOpacityModifyRGB(void) const override { return false;} + virtual bool isOpacityModifyRGB() const override { return false;} virtual std::string getDescription() const override; diff --git a/native/cocos/2d/CCMenuItem.cpp b/native/cocos/2d/CCMenuItem.cpp index e750a3639d..8fa6b7bce2 100644 --- a/native/cocos/2d/CCMenuItem.cpp +++ b/native/cocos/2d/CCMenuItem.cpp @@ -581,7 +581,7 @@ MenuItemImage* MenuItemImage::create() return nullptr; } -bool MenuItemImage::init(void) +bool MenuItemImage::init() { return initWithNormalImage("", "", "", (const ccMenuCallback&)nullptr); } diff --git a/native/cocos/2d/CCMotionStreak.cpp b/native/cocos/2d/CCMotionStreak.cpp index 3863ed0a01..4b2b52dd8d 100644 --- a/native/cocos/2d/CCMotionStreak.cpp +++ b/native/cocos/2d/CCMotionStreak.cpp @@ -205,7 +205,7 @@ void MotionStreak::tintWithColor(const Color3B& colors) } } -Texture2D* MotionStreak::getTexture(void) const +Texture2D* MotionStreak::getTexture() const { return _texture; } @@ -225,7 +225,7 @@ void MotionStreak::setBlendFunc(const BlendFunc &blendFunc) _blendFunc = blendFunc; } -const BlendFunc& MotionStreak::getBlendFunc(void) const +const BlendFunc& MotionStreak::getBlendFunc() const { return _blendFunc; } @@ -235,7 +235,7 @@ void MotionStreak::setOpacity(GLubyte opacity) CCASSERT(false, "Set opacity no supported"); } -GLubyte MotionStreak::getOpacity(void) const +GLubyte MotionStreak::getOpacity() const { CCASSERT(false, "Opacity no supported"); return 0; @@ -246,7 +246,7 @@ void MotionStreak::setOpacityModifyRGB(bool bValue) CC_UNUSED_PARAM(bValue); } -bool MotionStreak::isOpacityModifyRGB(void) const +bool MotionStreak::isOpacityModifyRGB() const { return false; } diff --git a/native/cocos/2d/CCMotionStreak.h b/native/cocos/2d/CCMotionStreak.h index 41f9e10188..27c4dbfd02 100644 --- a/native/cocos/2d/CCMotionStreak.h +++ b/native/cocos/2d/CCMotionStreak.h @@ -118,8 +118,8 @@ public: virtual void getPosition(float* x, float* y) const override; virtual void setPositionX(float x) override; virtual void setPositionY(float y) override; - virtual float getPositionX(void) const override; - virtual float getPositionY(void) const override; + virtual float getPositionX() const override; + virtual float getPositionY() const override; //virtual Vec3 getPosition3D() const override; /** * @js NA diff --git a/native/cocos/2d/CCNode.cpp b/native/cocos/2d/CCNode.cpp index a3f49dd8a9..1d9750a863 100644 --- a/native/cocos/2d/CCNode.cpp +++ b/native/cocos/2d/CCNode.cpp @@ -359,7 +359,7 @@ void Node::setRotationSkewY(float rotationY) } /// scale getter -float Node::getScale(void) const +float Node::getScale() const { CCASSERT( fabs(_scaleX - _scaleY) <= FLT_EPSILON, "CCNode#scale. ScaleX != ScaleY. Don't know which one to return"); return _scaleX; @@ -1835,7 +1835,7 @@ void Node::removeAllComponents() // MARK: Opacity and Color -GLubyte Node::getOpacity(void) const +GLubyte Node::getOpacity() const { return _realOpacity; } @@ -1866,7 +1866,7 @@ void Node::updateDisplayedOpacity(GLubyte parentOpacity) } } -bool Node::isCascadeOpacityEnabled(void) const +bool Node::isCascadeOpacityEnabled() const { return _cascadeOpacityEnabled; } @@ -1912,7 +1912,7 @@ void Node::disableCascadeOpacity() } } -const Color3B& Node::getColor(void) const +const Color3B& Node::getColor() const { return _realColor; } @@ -1945,7 +1945,7 @@ void Node::updateDisplayedColor(const Color3B& parentColor) } } -bool Node::isCascadeColorEnabled(void) const +bool Node::isCascadeColorEnabled() const { return _cascadeColorEnabled; } diff --git a/native/cocos/2d/CCNode.h b/native/cocos/2d/CCNode.h index 83e888e0ea..8cfdf86697 100644 --- a/native/cocos/2d/CCNode.h +++ b/native/cocos/2d/CCNode.h @@ -365,7 +365,7 @@ public: * * @return The x coordinate of the node. */ - virtual float getPositionX(void) const; + virtual float getPositionX() const; /** Sets the y coordinate of the node in its parent's coordinate system. * * @param y The y coordinate of the node. @@ -375,7 +375,7 @@ public: * * @return The y coordinate of the node. */ - virtual float getPositionY(void) const; + virtual float getPositionY() const; /** * Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value. @@ -1243,7 +1243,7 @@ public: * Only one "update" method could be scheduled per node. * @lua NA */ - void scheduleUpdate(void); + void scheduleUpdate(); /** * Schedules the "update" method with a custom priority. @@ -1261,7 +1261,7 @@ public: * Unschedules the "update" method. * @see scheduleUpdate(); */ - void unscheduleUpdate(void); + void unscheduleUpdate(); /** * Schedules a custom selector. @@ -1380,12 +1380,12 @@ public: * Resumes all scheduled selectors, actions and event listeners. * This method is called internally by onEnter. */ - virtual void resume(void); + virtual void resume(); /** * Pauses all scheduled selectors, actions and event listeners. * This method is called internally by onExit. */ - virtual void pause(void); + virtual void pause(); /** * Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live". @@ -1621,7 +1621,7 @@ CC_CONSTRUCTOR_ACCESS: protected: /// lazy allocs - void childrenAlloc(void); + void childrenAlloc(); /// helper that reorder a child void insertChild(Node* child, int z); diff --git a/native/cocos/2d/CCParticleBatchNode.h b/native/cocos/2d/CCParticleBatchNode.h index 075ec2129e..597176d42e 100644 --- a/native/cocos/2d/CCParticleBatchNode.h +++ b/native/cocos/2d/CCParticleBatchNode.h @@ -129,7 +129,7 @@ public: virtual void removeChild(Node* child, bool cleanup) override; virtual void reorderChild(Node * child, int zOrder) override; virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; - virtual Texture2D* getTexture(void) const override; + virtual Texture2D* getTexture() const override; virtual void setTexture(Texture2D *texture) override; /** * @code @@ -143,7 +143,7 @@ public: * @js NA * @lua NA */ - virtual const BlendFunc& getBlendFunc(void) const override; + virtual const BlendFunc& getBlendFunc() const override; CC_CONSTRUCTOR_ACCESS: /** @@ -169,7 +169,7 @@ private: void getCurrentIndex(int* oldIndex, int* newIndex, Node* child, int z); int addChildHelper(ParticleSystem* child, int z, int aTag, const std::string &name, bool setTag); void addChildByTagOrName(ParticleSystem* child, int z, int tag, const std::string &name, bool setTag); - void updateBlendFunc(void); + void updateBlendFunc(); /** the texture atlas used for drawing the quads */ TextureAtlas* _textureAtlas; diff --git a/native/cocos/2d/CCParticleSystem.cpp b/native/cocos/2d/CCParticleSystem.cpp index aaa5658c69..1cb211f2a1 100644 --- a/native/cocos/2d/CCParticleSystem.cpp +++ b/native/cocos/2d/CCParticleSystem.cpp @@ -1001,7 +1001,7 @@ void ParticleSystem::update(float dt) CC_PROFILER_STOP_CATEGORY(kProfilerCategoryParticles , "CCParticleSystem - update"); } -void ParticleSystem::updateWithNoTime(void) +void ParticleSystem::updateWithNoTime() { this->update(0.0f); } @@ -1290,7 +1290,7 @@ void ParticleSystem::setAutoRemoveOnFinish(bool var) // ParticleSystem - methods for batchNode rendering -ParticleBatchNode* ParticleSystem::getBatchNode(void) const +ParticleBatchNode* ParticleSystem::getBatchNode() const { return _batchNode; } diff --git a/native/cocos/2d/CCProgressTimer.cpp b/native/cocos/2d/CCProgressTimer.cpp index 3d26368000..493720d646 100644 --- a/native/cocos/2d/CCProgressTimer.cpp +++ b/native/cocos/2d/CCProgressTimer.cpp @@ -85,7 +85,7 @@ bool ProgressTimer::initWithSprite(Sprite* sp) return true; } -ProgressTimer::~ProgressTimer(void) +ProgressTimer::~ProgressTimer() { CC_SAFE_FREE(_vertexData); CC_SAFE_RELEASE(_sprite); @@ -181,7 +181,7 @@ Vec2 ProgressTimer::vertexFromAlphaPoint(Vec2 alpha) return ret; } -void ProgressTimer::updateColor(void) +void ProgressTimer::updateColor() { if (!_sprite) { return; @@ -197,7 +197,7 @@ void ProgressTimer::updateColor(void) } } -void ProgressTimer::updateProgress(void) +void ProgressTimer::updateProgress() { switch (_type) { @@ -258,7 +258,7 @@ void ProgressTimer::setMidpoint(const Vec2& midPoint) // It now deals with flipped texture. If you run into this problem, just use the // sprite property and enable the methods flipX, flipY. /// -void ProgressTimer::updateRadial(void) +void ProgressTimer::updateRadial() { if (!_sprite) { return; @@ -390,7 +390,7 @@ void ProgressTimer::updateRadial(void) // It now deals with flipped texture. If you run into this problem, just use the // sprite property and enable the methods flipX, flipY. /// -void ProgressTimer::updateBar(void) +void ProgressTimer::updateBar() { if (!_sprite) { return; diff --git a/native/cocos/2d/CCProgressTimer.h b/native/cocos/2d/CCProgressTimer.h index 047dc10682..a9197a717a 100644 --- a/native/cocos/2d/CCProgressTimer.h +++ b/native/cocos/2d/CCProgressTimer.h @@ -179,10 +179,10 @@ protected: Tex2F textureCoordFromAlphaPoint(Vec2 alpha); Vec2 vertexFromAlphaPoint(Vec2 alpha); - void updateProgress(void); - void updateBar(void); - void updateRadial(void); - virtual void updateColor(void) override; + void updateProgress(); + void updateBar(); + void updateRadial(); + virtual void updateColor() override; Vec2 boundaryTexCoord(char index); Type _type; diff --git a/native/cocos/2d/CCProtectedNode.cpp b/native/cocos/2d/CCProtectedNode.cpp index a55fe2d46b..dbed0556a0 100644 --- a/native/cocos/2d/CCProtectedNode.cpp +++ b/native/cocos/2d/CCProtectedNode.cpp @@ -43,7 +43,7 @@ ProtectedNode::~ProtectedNode() CCLOGINFO( "deallocing ProtectedNode: %p - tag: %i", this, _tag ); } -ProtectedNode * ProtectedNode::create(void) +ProtectedNode * ProtectedNode::create() { ProtectedNode * ret = new (std::nothrow) ProtectedNode(); if (ret && ret->init()) diff --git a/native/cocos/2d/CCProtectedNode.h b/native/cocos/2d/CCProtectedNode.h index 82b8408f1e..89b4cf7c04 100644 --- a/native/cocos/2d/CCProtectedNode.h +++ b/native/cocos/2d/CCProtectedNode.h @@ -50,7 +50,7 @@ public: * Creates a ProtectedNode with no argument. *@return A instance of ProtectedNode. */ - static ProtectedNode * create(void); + static ProtectedNode * create(); /// @{ /// @name Children and Parent diff --git a/native/cocos/2d/CCSprite.cpp b/native/cocos/2d/CCSprite.cpp index 8d0151118e..d3ca07ca09 100644 --- a/native/cocos/2d/CCSprite.cpp +++ b/native/cocos/2d/CCSprite.cpp @@ -771,7 +771,7 @@ void Sprite::sortAllChildren() // used only when parent is SpriteBatchNode // -void Sprite::setReorderChildDirtyRecursively(void) +void Sprite::setReorderChildDirtyRecursively() { //only set parents flag the first time if ( ! _reorderChildDirty ) @@ -916,7 +916,7 @@ void Sprite::setFlippedX(bool flippedX) } } -bool Sprite::isFlippedX(void) const +bool Sprite::isFlippedX() const { return _flippedX; } @@ -936,7 +936,7 @@ void Sprite::setFlippedY(bool flippedY) } } -bool Sprite::isFlippedY(void) const +bool Sprite::isFlippedY() const { return _flippedY; } @@ -945,7 +945,7 @@ bool Sprite::isFlippedY(void) const // MARK: RGBA protocol // -void Sprite::updateColor(void) +void Sprite::updateColor() { Color4B color4( _displayedColor.r, _displayedColor.g, _displayedColor.b, _displayedOpacity ); @@ -986,7 +986,7 @@ void Sprite::setOpacityModifyRGB(bool modify) } } -bool Sprite::isOpacityModifyRGB(void) const +bool Sprite::isOpacityModifyRGB() const { return _opacityModifyRGB; } @@ -1120,7 +1120,7 @@ void Sprite::setBatchNode(SpriteBatchNode *spriteBatchNode) // MARK: Texture protocol -void Sprite::updateBlendFunc(void) +void Sprite::updateBlendFunc() { CCASSERT(! _batchNode, "CCSprite: updateBlendFunc doesn't work when the sprite is rendered using a SpriteBatchNode"); diff --git a/native/cocos/2d/CCTransition.h b/native/cocos/2d/CCTransition.h index 5b126ef15d..86428d714d 100644 --- a/native/cocos/2d/CCTransition.h +++ b/native/cocos/2d/CCTransition.h @@ -96,11 +96,11 @@ public: /** Called after the transition finishes. */ - void finish(void); + void finish(); /** Used by some transitions to hide the outer scene. */ - void hideOutShowIn(void); + void hideOutShowIn(); Scene* getInScene() const{ return _inScene; } float getDuration() const { return _duration; } @@ -239,7 +239,7 @@ public: * * @return The action that will be performed. */ - virtual ActionInterval* action(void); + virtual ActionInterval* action(); virtual ActionInterval* easeActionWithAction(ActionInterval * action) override; @@ -359,7 +359,7 @@ public: * * @return The action that will be performed by the incoming and outgoing scene. */ - virtual ActionInterval* action(void); + virtual ActionInterval* action(); // // Overrides @@ -372,7 +372,7 @@ CC_CONSTRUCTOR_ACCESS: protected: /** initializes the scenes */ - virtual void initScenes(void); + virtual void initScenes(); virtual void sceneOrder() override; @@ -396,7 +396,7 @@ public: static TransitionSlideInR* create(float t, Scene* scene); /** Returns the action that will be performed by the incoming and outgoing scene. */ - virtual ActionInterval* action(void) override; + virtual ActionInterval* action() override; CC_CONSTRUCTOR_ACCESS: TransitionSlideInR(); @@ -404,7 +404,7 @@ CC_CONSTRUCTOR_ACCESS: protected: /** initializes the scenes */ - virtual void initScenes(void) override; + virtual void initScenes() override; virtual void sceneOrder() override; @@ -428,7 +428,7 @@ public: static TransitionSlideInB* create(float t, Scene* scene); /** returns the action that will be performed by the incoming and outgoing scene */ - virtual ActionInterval* action(void) override; + virtual ActionInterval* action() override; CC_CONSTRUCTOR_ACCESS: TransitionSlideInB(); @@ -460,7 +460,7 @@ public: static TransitionSlideInT* create(float t, Scene* scene); /** returns the action that will be performed by the incoming and outgoing scene */ - virtual ActionInterval* action(void) override; + virtual ActionInterval* action() override; CC_CONSTRUCTOR_ACCESS: TransitionSlideInT(); @@ -468,7 +468,7 @@ CC_CONSTRUCTOR_ACCESS: protected: /** initializes the scenes */ - virtual void initScenes(void) override; + virtual void initScenes() override; virtual void sceneOrder() override; @@ -941,7 +941,7 @@ public: // // Overrides // - virtual ActionInterval* action(void) override; + virtual ActionInterval* action() override; CC_CONSTRUCTOR_ACCESS: TransitionSplitRows(); diff --git a/native/cocos/base/CCConsole.cpp b/native/cocos/base/CCConsole.cpp index ebfdac80b3..9a3c140dcc 100644 --- a/native/cocos/base/CCConsole.cpp +++ b/native/cocos/base/CCConsole.cpp @@ -69,7 +69,7 @@ #include "base/ccUtils.h" NS_CC_BEGIN -extern const char* cocos2dVersion(void); +extern const char* cocos2dVersion(); //TODO: these general utils should be in a separate class // // Trimming functions were taken from: http://stackoverflow.com/a/217605 diff --git a/native/cocos/base/CCDirector.cpp b/native/cocos/base/CCDirector.cpp index 358dcf0ed3..79c8780cc8 100644 --- a/native/cocos/base/CCDirector.cpp +++ b/native/cocos/base/CCDirector.cpp @@ -79,7 +79,7 @@ NS_CC_BEGIN // FIXME: it should be a Director ivar. Move it there once support for multiple directors is added #define kDefaultFPS 60 // 60 frames per second -extern const char* cocos2dVersion(void); +extern const char* cocos2dVersion(); Director* Director::DirectorInstance = nullptr; @@ -107,7 +107,7 @@ Director::Director() { } -bool Director::init(void) +bool Director::init() { setDefaultValues(); @@ -172,7 +172,7 @@ bool Director::init(void) return true; } -Director::~Director(void) +Director::~Director() { CCLOGINFO("deallocing Director: %p", this); @@ -638,7 +638,7 @@ void Director::setProjection(Projection projection) _eventDispatcher->dispatchEvent(_eventProjectionChanged); } -void Director::purgeCachedData(void) +void Director::purgeCachedData() { FontFNT::purgeCachedData(); FontAtlasCache::purgeCachedData(); @@ -655,7 +655,7 @@ void Director::purgeCachedData(void) FileUtils::getInstance()->purgeCachedEntries(); } -float Director::getZEye(void) const +float Director::getZEye() const { return (_winSizeInPoints.height / 1.1566f); } @@ -743,7 +743,7 @@ Vec2 Director::convertToUI(const Vec2& glPoint) return Vec2(glSize.width*(clipCoord.x*0.5 + 0.5) * factor, glSize.height*(-clipCoord.y*0.5 + 0.5) * factor); } -const Size& Director::getWinSize(void) const +const Size& Director::getWinSize() const { return _winSizeInPoints; } @@ -829,7 +829,7 @@ void Director::pushScene(Scene *scene) _nextScene = scene; } -void Director::popScene(void) +void Director::popScene() { CCASSERT(_runningScene != nullptr, "running scene should not null"); @@ -847,7 +847,7 @@ void Director::popScene(void) } } -void Director::popToRootScene(void) +void Director::popToRootScene() { popToSceneStackLevel(1); } diff --git a/native/cocos/base/CCProfiling.cpp b/native/cocos/base/CCProfiling.cpp index 67b350da80..6485cdb1f3 100644 --- a/native/cocos/base/CCProfiling.cpp +++ b/native/cocos/base/CCProfiling.cpp @@ -74,7 +74,7 @@ bool Profiler::init() return true; } -Profiler::~Profiler(void) +Profiler::~Profiler() { } @@ -105,7 +105,7 @@ bool ProfilingTimer::initWithName(const char* timerName) return true; } -ProfilingTimer::~ProfilingTimer(void) +ProfilingTimer::~ProfilingTimer() { } diff --git a/native/cocos/base/CCProfiling.h b/native/cocos/base/CCProfiling.h index 4e3ae21cad..e8c8cc81b6 100644 --- a/native/cocos/base/CCProfiling.h +++ b/native/cocos/base/CCProfiling.h @@ -56,24 +56,24 @@ public: * @js NA * @lua NA */ - ~Profiler(void); + ~Profiler(); /** display the timers * @js NA * @lua NA */ - void displayTimers(void); + void displayTimers(); /** * @js NA * @lua NA */ - bool init(void); + bool init(); public: /** returns the singleton * @js NA * @lua NA */ - static Profiler* getInstance(void); + static Profiler* getInstance(); /** Creates and adds a new timer * @js NA @@ -106,7 +106,7 @@ public: * @js NA * @lua NA */ - ~ProfilingTimer(void); + ~ProfilingTimer(); /** * @js NA * @lua NA @@ -121,7 +121,7 @@ public: * @js NA * @lua NA */ - inline const std::chrono::high_resolution_clock::time_point& getStartTime(void) { return _startTime; }; + inline const std::chrono::high_resolution_clock::time_point& getStartTime() { return _startTime; }; /** resets the timer properties * @js NA diff --git a/native/cocos/base/CCScheduler.cpp b/native/cocos/base/CCScheduler.cpp index 202e54765a..6b53696587 100644 --- a/native/cocos/base/CCScheduler.cpp +++ b/native/cocos/base/CCScheduler.cpp @@ -243,7 +243,7 @@ const int Scheduler::PRIORITY_SYSTEM = INT_MIN; // Minimum priority level for user scheduling. const int Scheduler::PRIORITY_NON_SYSTEM_MIN = PRIORITY_SYSTEM + 1; -Scheduler::Scheduler(void) +Scheduler::Scheduler() : _timeScale(1.0f) , _updatesNegList(nullptr) , _updates0List(nullptr) @@ -261,7 +261,7 @@ Scheduler::Scheduler(void) _functionsToPerform.reserve(30); } -Scheduler::~Scheduler(void) +Scheduler::~Scheduler() { unscheduleAll(); } @@ -579,7 +579,7 @@ void Scheduler::unscheduleUpdate(void *target) } } -void Scheduler::unscheduleAll(void) +void Scheduler::unscheduleAll() { unscheduleAllWithMinPriority(PRIORITY_SYSTEM); } diff --git a/native/cocos/base/CCScriptSupport.h b/native/cocos/base/CCScriptSupport.h index 2d100df147..6057faaea9 100644 --- a/native/cocos/base/CCScriptSupport.h +++ b/native/cocos/base/CCScriptSupport.h @@ -91,7 +91,7 @@ public: * @lua NA * @js NA */ - int getHandler(void) { + int getHandler() { return _handler; } @@ -102,7 +102,7 @@ public: * @lua NA * @js NA */ - int getEntryId(void) { + int getEntryId() { return _entryId; } @@ -153,7 +153,7 @@ public: * @js NA * @lua NA */ - TimerScriptHandler* getTimer(void) { + TimerScriptHandler* getTimer() { return _timer; } @@ -164,7 +164,7 @@ public: * @js NA * @lua NA */ - bool isPaused(void) { + bool isPaused() { return _paused; } /** @@ -172,7 +172,7 @@ public: * @js NA * @lua NA */ - void markedForDeletion(void) { + void markedForDeletion() { _markedForDeletion = true; } /** @@ -182,7 +182,7 @@ public: * @js NA * @lua NA */ - bool isMarkedForDeletion(void) { + bool isMarkedForDeletion() { return _markedForDeletion; } @@ -214,15 +214,15 @@ public: virtual ~TouchScriptHandlerEntry(); - bool isMultiTouches(void) { + bool isMultiTouches() { return _isMultiTouches; } - int getPriority(void) { + int getPriority() { return _priority; } - bool getSwallowsTouches(void) { + bool getSwallowsTouches() { return _swallowsTouches; } diff --git a/native/cocos/base/ObjectFactory.cpp b/native/cocos/base/ObjectFactory.cpp index dfed58c5d3..28e7c1dfc6 100644 --- a/native/cocos/base/ObjectFactory.cpp +++ b/native/cocos/base/ObjectFactory.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. NS_CC_BEGIN -ObjectFactory::TInfo::TInfo(void) +ObjectFactory::TInfo::TInfo() :_class("") ,_fun(nullptr) ,_func(nullptr) @@ -58,7 +58,7 @@ ObjectFactory::TInfo::TInfo(const TInfo &t) _func = t._func; } -ObjectFactory::TInfo::~TInfo(void) +ObjectFactory::TInfo::~TInfo() { _class = ""; _fun = nullptr; @@ -76,12 +76,12 @@ ObjectFactory::TInfo& ObjectFactory::TInfo::operator= (const TInfo &t) ObjectFactory* ObjectFactory::_sharedFactory = nullptr; -ObjectFactory::ObjectFactory(void) +ObjectFactory::ObjectFactory() { } -ObjectFactory::~ObjectFactory(void) +ObjectFactory::~ObjectFactory() { _typeMap.clear(); } diff --git a/native/cocos/base/ObjectFactory.h b/native/cocos/base/ObjectFactory.h index edc361a846..fabeaf7b0a 100644 --- a/native/cocos/base/ObjectFactory.h +++ b/native/cocos/base/ObjectFactory.h @@ -36,15 +36,15 @@ NS_CC_BEGIN class CC_DLL ObjectFactory { public: - typedef cocos2d::Ref* (*Instance)(void); - typedef std::function InstanceFunc; + typedef cocos2d::Ref* (*Instance)(); + typedef std::function InstanceFunc; struct CC_DLL TInfo { - TInfo(void); + TInfo(); TInfo(const std::string& type, Instance ins = nullptr); TInfo(const std::string& type, InstanceFunc ins = nullptr); TInfo(const TInfo &t); - ~TInfo(void); + ~TInfo(); TInfo& operator= (const TInfo &t); std::string _class; Instance _fun; @@ -60,8 +60,8 @@ public: void removeAll(); protected: - ObjectFactory(void); - virtual ~ObjectFactory(void); + ObjectFactory(); + virtual ~ObjectFactory(); private: static ObjectFactory *_sharedFactory; FactoryMap _typeMap; diff --git a/native/cocos/base/ccFPSImages.c b/native/cocos/base/ccFPSImages.c index 78a8676799..7424ad5ef9 100644 --- a/native/cocos/base/ccFPSImages.c +++ b/native/cocos/base/ccFPSImages.c @@ -2372,7 +2372,7 @@ unsigned char cc_fps_images_png[] = { 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 }; -unsigned int cc_fps_images_len(void) +unsigned int cc_fps_images_len() { return sizeof(cc_fps_images_png); } diff --git a/native/cocos/base/ccFPSImages.h b/native/cocos/base/ccFPSImages.h index 4b8b2002f4..2d4070f96f 100644 --- a/native/cocos/base/ccFPSImages.h +++ b/native/cocos/base/ccFPSImages.h @@ -32,7 +32,7 @@ extern "C" { #endif extern unsigned char cc_fps_images_png[]; -unsigned int cc_fps_images_len(void); +unsigned int cc_fps_images_len(); #ifdef __cplusplus } diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmature.cpp b/native/cocos/editor-support/cocostudio/Armature/CCArmature.cpp index aaf18c3528..77d1f3014b 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmature.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmature.cpp @@ -93,7 +93,7 @@ Armature::Armature() } -Armature::~Armature(void) +Armature::~Armature() { _boneDic.clear(); _topBoneList.clear(); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmature.h b/native/cocos/editor-support/cocostudio/Armature/CCArmature.h index a5a3f4bbd8..ae4b2c878f 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmature.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmature.h @@ -69,7 +69,7 @@ public: * @js NA * @lua NA */ - virtual ~Armature(void); + virtual ~Armature(); /** * Init the empty armature @@ -146,7 +146,7 @@ public: * @js NA * @lua NA */ - inline const cocos2d::BlendFunc &getBlendFunc(void) const override{ return _blendFunc; } + inline const cocos2d::BlendFunc &getBlendFunc() const override{ return _blendFunc; } /** diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.cpp b/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.cpp index c53a38ff9d..9f425516bd 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.cpp @@ -71,7 +71,7 @@ ArmatureAnimation::ArmatureAnimation() } -ArmatureAnimation::~ArmatureAnimation(void) +ArmatureAnimation::~ArmatureAnimation() { CC_SAFE_RELEASE_NULL(_animationData); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.h b/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.h index 287c961f61..d57bc1794e 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmatureAnimation.h @@ -83,7 +83,7 @@ public: * @js NA * @lua NA */ - virtual ~ArmatureAnimation(void); + virtual ~ArmatureAnimation(); /** * Init with a Armature diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.cpp b/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.cpp index c1f3c9a57c..bc66c2e30d 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.cpp @@ -55,7 +55,7 @@ void ArmatureDataManager::destroyInstance() CC_SAFE_RELEASE_NULL(s_sharedArmatureDataManager); } -ArmatureDataManager::ArmatureDataManager(void) +ArmatureDataManager::ArmatureDataManager() { _armarureDatas.clear(); _animationDatas.clear(); @@ -64,7 +64,7 @@ ArmatureDataManager::ArmatureDataManager(void) } -ArmatureDataManager::~ArmatureDataManager(void) +ArmatureDataManager::~ArmatureDataManager() { _animationDatas.clear(); _armarureDatas.clear(); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.h b/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.h index fe8452fd47..c1d7c46b11 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCArmatureDataManager.h @@ -52,12 +52,12 @@ private: /** * @js ctor */ - ArmatureDataManager(void); + ArmatureDataManager(); /** * @js NA * @lua NA */ - ~ArmatureDataManager(void); + ~ArmatureDataManager(); public: diff --git a/native/cocos/editor-support/cocostudio/Armature/CCBone.cpp b/native/cocos/editor-support/cocostudio/Armature/CCBone.cpp index d135c8983c..252a50625f 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCBone.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCBone.cpp @@ -81,7 +81,7 @@ Bone::Bone() } -Bone::~Bone(void) +Bone::~Bone() { CC_SAFE_DELETE(_tweenData); CC_SAFE_DELETE(_tween); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCBone.h b/native/cocos/editor-support/cocostudio/Armature/CCBone.h index 977819f806..b8d3783740 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCBone.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCBone.h @@ -63,7 +63,7 @@ public: * @js NA * @lua NA */ - virtual ~Bone(void); + virtual ~Bone(); /** * Initializes an empty Bone with nothing init. @@ -188,13 +188,13 @@ public: * Set blend function */ virtual void setBlendFunc(const cocos2d::BlendFunc& blendFunc); - virtual cocos2d::BlendFunc getBlendFunc(void) { return _blendFunc; } + virtual cocos2d::BlendFunc getBlendFunc() { return _blendFunc; } /* * Set if blend function is dirty */ virtual void setBlendDirty(bool dirty) { _blendDirty = dirty; } - virtual bool isBlendDirty(void) { return _blendDirty; } + virtual bool isBlendDirty() { return _blendDirty; } virtual FrameData *getTweenData() const { return _tweenData; } diff --git a/native/cocos/editor-support/cocostudio/Armature/CCColliderDetector.h b/native/cocos/editor-support/cocostudio/Armature/CCColliderDetector.h index ad508ceec4..9f0081eac3 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCColliderDetector.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCColliderDetector.h @@ -145,7 +145,7 @@ public: * @js NA * @lua NA */ - ~ColliderDetector(void); + ~ColliderDetector(); virtual bool init(); virtual bool init(Bone *bone); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCDatas.cpp b/native/cocos/editor-support/cocostudio/Armature/CCDatas.cpp index 50bdeb27a5..92cb20be2a 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCDatas.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCDatas.cpp @@ -156,7 +156,7 @@ std::string DisplayData::changeDisplayToTexture(const std::string& displayName) return textureName; } -DisplayData::DisplayData(void) +DisplayData::DisplayData() : displayType(CS_DISPLAY_MAX) , displayName("") { @@ -168,7 +168,7 @@ void DisplayData::copy(DisplayData *displayData) displayType = displayData->displayType; } -SpriteDisplayData::SpriteDisplayData(void) +SpriteDisplayData::SpriteDisplayData() { displayType = CS_DISPLAY_SPRITE; } @@ -184,25 +184,25 @@ void SpriteDisplayData::copy(DisplayData *displayData) } } -ArmatureDisplayData::ArmatureDisplayData(void) +ArmatureDisplayData::ArmatureDisplayData() { displayType = CS_DISPLAY_ARMATURE; } -ParticleDisplayData::ParticleDisplayData(void) +ParticleDisplayData::ParticleDisplayData() { displayType = CS_DISPLAY_PARTICLE; } -BoneData::BoneData(void) +BoneData::BoneData() : name("") , parentName("") { } -BoneData::~BoneData(void) +BoneData::~BoneData() { } @@ -246,7 +246,7 @@ BoneData *ArmatureData::getBoneData(const std::string& boneName) return static_cast(boneDataDic.at(boneName)); } -FrameData::FrameData(void) +FrameData::FrameData() : frameID(0) , duration(1) , tweenEasing(cocos2d::tweenfunc::Linear) @@ -263,7 +263,7 @@ FrameData::FrameData(void) { } -FrameData::~FrameData(void) +FrameData::~FrameData() { CC_SAFE_DELETE(easingParams); } @@ -303,7 +303,7 @@ MovementBoneData::MovementBoneData() { } -MovementBoneData::~MovementBoneData(void) +MovementBoneData::~MovementBoneData() { } @@ -324,7 +324,7 @@ FrameData *MovementBoneData::getFrameData(int index) -MovementData::MovementData(void) +MovementData::MovementData() : name("") , duration(0) , scale(1.0f) @@ -335,7 +335,7 @@ MovementData::MovementData(void) { } -MovementData::~MovementData(void) +MovementData::~MovementData() { } @@ -351,11 +351,11 @@ MovementBoneData *MovementData::getMovementBoneData(const std::string& boneName) -AnimationData::AnimationData(void) +AnimationData::AnimationData() { } -AnimationData::~AnimationData(void) +AnimationData::~AnimationData() { } diff --git a/native/cocos/editor-support/cocostudio/Armature/CCDatas.h b/native/cocos/editor-support/cocostudio/Armature/CCDatas.h index d3071a1153..b9105351b6 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCDatas.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCDatas.h @@ -38,7 +38,7 @@ THE SOFTWARE. #define CC_CREATE_NO_PARAM_NO_INIT(varType)\ public: \ - static inline varType *create(void){ \ + static inline varType *create(){ \ varType *var = new (std::nothrow) varType();\ if (var)\ {\ @@ -51,7 +51,7 @@ public: \ #define CC_CREATE_NO_PARAM(varType)\ public: \ - static inline varType *create(void){ \ + static inline varType *create(){ \ varType *var = new (std::nothrow) varType();\ if (var && var->init())\ {\ @@ -82,7 +82,7 @@ public: * @js NA * @lua NA */ - ~BaseData(void); + ~BaseData(); /* * Copy data from node @@ -153,7 +153,7 @@ public: * @js NA * @lua NA */ - virtual ~DisplayData(void) {} + virtual ~DisplayData() {} virtual void copy(DisplayData *displayData); @@ -243,12 +243,12 @@ public: /** * @js ctor */ - BoneData(void); + BoneData(); /** * @js NA * @lua NA */ - ~BoneData(void); + ~BoneData(); virtual bool init(); @@ -375,7 +375,7 @@ public: * @js NA * @lua NA */ - ~MovementBoneData(void); + ~MovementBoneData(); virtual bool init(); @@ -402,12 +402,12 @@ public: /** * @js ctor */ - MovementData(void); + MovementData(); /** * @js NA * @lua NA */ - ~MovementData(void); + ~MovementData(); void addMovementBoneData(MovementBoneData *movBoneData); MovementBoneData *getMovementBoneData(const std::string& boneName); @@ -464,12 +464,12 @@ public: /** * @js ctor */ - AnimationData(void); + AnimationData(); /** * @js NA * @lua NA */ - ~AnimationData(void); + ~AnimationData(); void addMovement(MovementData *movData); MovementData *getMovement(const std::string& movementName); @@ -500,7 +500,7 @@ public: * @js NA * @lua NA */ - ~ContourData(void); + ~ContourData(); virtual bool init(); virtual void addVertex(cocos2d::Vec2 &vertex); @@ -529,7 +529,7 @@ public: * @js NA * @lua NA */ - ~TextureData(void); + ~TextureData(); virtual bool init(); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.cpp b/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.cpp index b8f6827357..cf44dc50f8 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.cpp @@ -52,7 +52,7 @@ DecorativeDisplay::DecorativeDisplay() } -DecorativeDisplay::~DecorativeDisplay(void) +DecorativeDisplay::~DecorativeDisplay() { CC_SAFE_RELEASE_NULL(_displayData); CC_SAFE_RELEASE_NULL(_display); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.h b/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.h index 9443494209..c5054aa1ed 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCDecorativeDisplay.h @@ -49,8 +49,8 @@ class CC_STUDIO_DLL DecorativeDisplay: public cocos2d::Ref public: static DecorativeDisplay *create(); public: - DecorativeDisplay(void); - ~DecorativeDisplay(void); + DecorativeDisplay(); + ~DecorativeDisplay(); virtual bool init(); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.cpp b/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.cpp index 649345d6fd..c67a93d1ac 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.cpp @@ -29,7 +29,7 @@ using namespace cocos2d; namespace cocostudio { -ProcessBase::ProcessBase(void) +ProcessBase::ProcessBase() : _processScale(1) , _isPause(true) , _isComplete(true) @@ -47,7 +47,7 @@ ProcessBase::ProcessBase(void) } -ProcessBase::~ProcessBase(void) +ProcessBase::~ProcessBase() { } diff --git a/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.h b/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.h index ace71ddaae..542981a425 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCProcessBase.h @@ -54,8 +54,8 @@ enum AnimationType class CC_STUDIO_DLL ProcessBase : public cocos2d::Ref { public: - ProcessBase(void); - virtual ~ProcessBase(void); + ProcessBase(); + virtual ~ProcessBase(); /** * Play animation by animation name. diff --git a/native/cocos/editor-support/cocostudio/Armature/CCTween.cpp b/native/cocos/editor-support/cocostudio/Armature/CCTween.cpp index a5b8d5ad2f..b5a7af6cb6 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCTween.cpp +++ b/native/cocos/editor-support/cocostudio/Armature/CCTween.cpp @@ -68,7 +68,7 @@ Tween::Tween() } -Tween::~Tween(void) +Tween::~Tween() { CC_SAFE_DELETE( _from ); CC_SAFE_DELETE( _between ); diff --git a/native/cocos/editor-support/cocostudio/Armature/CCTween.h b/native/cocos/editor-support/cocostudio/Armature/CCTween.h index 2f64bbe883..908b6a9bc1 100644 --- a/native/cocos/editor-support/cocostudio/Armature/CCTween.h +++ b/native/cocos/editor-support/cocostudio/Armature/CCTween.h @@ -49,8 +49,8 @@ public: */ static Tween *create(Bone *bone); public: - Tween(void); - virtual ~Tween(void); + Tween(); + virtual ~Tween(); /** * Init with a Bone diff --git a/native/cocos/editor-support/cocostudio/CCComAttribute.h b/native/cocos/editor-support/cocostudio/CCComAttribute.h index 5044468eea..315a99002f 100644 --- a/native/cocos/editor-support/cocostudio/CCComAttribute.h +++ b/native/cocos/editor-support/cocostudio/CCComAttribute.h @@ -39,17 +39,17 @@ public: /** * @js ctor */ - ComAttribute(void); + ComAttribute(); /** * @js NA * @lua NA */ - virtual ~ComAttribute(void); + virtual ~ComAttribute(); public: const static std::string COMPONENT_NAME; - static ComAttribute* create(void); + static ComAttribute* create(); virtual bool init() override; virtual bool serialize(void* r) override; diff --git a/native/cocos/editor-support/cocostudio/CCComBase.h b/native/cocos/editor-support/cocostudio/CCComBase.h index f27f5dc3d7..1fd07d78dc 100644 --- a/native/cocos/editor-support/cocostudio/CCComBase.h +++ b/native/cocos/editor-support/cocostudio/CCComBase.h @@ -35,10 +35,10 @@ THE SOFTWARE. #define DECLARE_CLASS_COMPONENT_INFO \ public: \ static cocos2d::ObjectFactory::TInfo Type; \ - static cocos2d::Ref* createInstance(void); \ + static cocos2d::Ref* createInstance(); \ #define IMPLEMENT_CLASS_COMPONENT_INFO(className) \ - cocos2d::Ref* className::createInstance(void) \ + cocos2d::Ref* className::createInstance() \ { \ return className::create(); \ } \ diff --git a/native/cocos/editor-support/cocostudio/CCInputDelegate.cpp b/native/cocos/editor-support/cocostudio/CCInputDelegate.cpp index a51d2cf4d8..54ce047224 100644 --- a/native/cocos/editor-support/cocostudio/CCInputDelegate.cpp +++ b/native/cocos/editor-support/cocostudio/CCInputDelegate.cpp @@ -34,7 +34,7 @@ using namespace cocos2d; namespace cocostudio { -InputDelegate::InputDelegate(void) +InputDelegate::InputDelegate() : _touchEnabled(false) , _touchListener(nullptr) , _accelerometerEnabled(false) @@ -47,7 +47,7 @@ InputDelegate::InputDelegate(void) } -InputDelegate::~InputDelegate(void) +InputDelegate::~InputDelegate() { auto dispatcher = Director::getInstance()->getEventDispatcher(); dispatcher->removeEventListener(_touchListener); diff --git a/native/cocos/editor-support/cocostudio/CCInputDelegate.h b/native/cocos/editor-support/cocostudio/CCInputDelegate.h index 39c8bdcd7b..8ebdf4fbfb 100644 --- a/native/cocos/editor-support/cocostudio/CCInputDelegate.h +++ b/native/cocos/editor-support/cocostudio/CCInputDelegate.h @@ -48,11 +48,11 @@ CC_CONSTRUCTOR_ACCESS: /** * @js ctor */ - InputDelegate(void); + InputDelegate(); /** * @js NA */ - virtual ~InputDelegate(void); + virtual ~InputDelegate(); public: virtual bool isTouchEnabled() const; diff --git a/native/cocos/editor-support/spine/Json.c b/native/cocos/editor-support/spine/Json.c index be3c9538b1..4eaf14a440 100644 --- a/native/cocos/editor-support/spine/Json.c +++ b/native/cocos/editor-support/spine/Json.c @@ -48,7 +48,7 @@ static const char* ep; -const char* Json_getError (void) { +const char* Json_getError () { return ep; } @@ -73,7 +73,7 @@ static int Json_strcasecmp (const char* s1, const char* s2) { } /* Internal constructor. */ -static Json *Json_new (void) { +static Json *Json_new () { return (Json*)CALLOC(Json, 1); } diff --git a/native/cocos/editor-support/spine/Json.h b/native/cocos/editor-support/spine/Json.h index dc4cbf0826..ccd590b732 100644 --- a/native/cocos/editor-support/spine/Json.h +++ b/native/cocos/editor-support/spine/Json.h @@ -74,7 +74,7 @@ float Json_getFloat (Json* json, const char* name, float defaultValue); int Json_getInt (Json* json, const char* name, int defaultValue); /* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when Json_create() returns 0. 0 when Json_create() succeeds. */ -const char* Json_getError (void); +const char* Json_getError (); #ifdef __cplusplus } diff --git a/native/cocos/math/CCGeometry.cpp b/native/cocos/math/CCGeometry.cpp index 8d790d8620..8dc9c369ec 100644 --- a/native/cocos/math/CCGeometry.cpp +++ b/native/cocos/math/CCGeometry.cpp @@ -33,7 +33,7 @@ NS_CC_BEGIN // implementation of Size -Size::Size(void) : width(0), height(0) +Size::Size() : width(0), height(0) { } @@ -98,7 +98,7 @@ const Size Size::ZERO = Size(0, 0); // implementation of Rect -Rect::Rect(void) +Rect::Rect() { setRect(0.0f, 0.0f, 0.0f, 0.0f); } diff --git a/native/cocos/network/HttpClient.h b/native/cocos/network/HttpClient.h index a6933e65cb..b59ef81f71 100644 --- a/native/cocos/network/HttpClient.h +++ b/native/cocos/network/HttpClient.h @@ -152,7 +152,7 @@ public: private: HttpClient(); virtual ~HttpClient(); - bool init(void); + bool init(); /** * Init pthread mutex, semaphore, and create new thread for http requests diff --git a/native/cocos/network/HttpRequest.h b/native/cocos/network/HttpRequest.h index f581c46a82..9190d43636 100644 --- a/native/cocos/network/HttpRequest.h +++ b/native/cocos/network/HttpRequest.h @@ -107,7 +107,7 @@ public: * * @return Ref* always return nullptr. */ - Ref* autorelease(void) + Ref* autorelease() { CCASSERT(false, "HttpResponse is used between network thread and ui thread \ therefore, autorelease is forbidden here"); diff --git a/native/cocos/network/SocketIO.cpp b/native/cocos/network/SocketIO.cpp index f806777aa5..07c17c3cf9 100644 --- a/native/cocos/network/SocketIO.cpp +++ b/native/cocos/network/SocketIO.cpp @@ -355,7 +355,7 @@ private: public: SIOClientImpl(const std::string& host, int port); - virtual ~SIOClientImpl(void); + virtual ~SIOClientImpl(); static SIOClientImpl* create(const std::string& host, int port); @@ -1009,7 +1009,7 @@ SIOClient::SIOClient(const std::string& host, int port, const std::string& path, } -SIOClient::~SIOClient(void) +SIOClient::~SIOClient() { if (_connected) { @@ -1109,7 +1109,7 @@ SocketIO::SocketIO() { } -SocketIO::~SocketIO(void) +SocketIO::~SocketIO() { } diff --git a/native/cocos/network/SocketIO.h b/native/cocos/network/SocketIO.h index edb05a5a0b..c0b8cdfec6 100644 --- a/native/cocos/network/SocketIO.h +++ b/native/cocos/network/SocketIO.h @@ -157,7 +157,7 @@ public: private: SocketIO(); - virtual ~SocketIO(void); + virtual ~SocketIO(); static SocketIO *_inst; @@ -217,7 +217,7 @@ public: /** * Destructor of SIOClient class. */ - virtual ~SIOClient(void); + virtual ~SIOClient(); /** * Get the delegate for the client diff --git a/native/cocos/platform/CCPlatformMacros.h b/native/cocos/platform/CCPlatformMacros.h index 8a0157cc49..fbd72ae695 100644 --- a/native/cocos/platform/CCPlatformMacros.h +++ b/native/cocos/platform/CCPlatformMacros.h @@ -107,11 +107,11 @@ static __TYPE__* create() \ */ #define CC_PROPERTY_READONLY(varType, varName, funName)\ protected: varType varName;\ -public: virtual varType get##funName(void) const; +public: virtual varType get##funName() const; #define CC_PROPERTY_READONLY_PASS_BY_REF(varType, varName, funName)\ protected: varType varName;\ -public: virtual const varType& get##funName(void) const; +public: virtual const varType& get##funName() const; /** @def CC_PROPERTY * It is used to declare a protected variable. @@ -127,12 +127,12 @@ public: virtual const varType& get##funName(void) const; */ #define CC_PROPERTY(varType, varName, funName)\ protected: varType varName;\ -public: virtual varType get##funName(void);\ +public: virtual varType get##funName();\ public: virtual void set##funName(varType var); #define CC_PROPERTY_PASS_BY_REF(varType, varName, funName)\ protected: varType varName;\ -public: virtual const varType& get##funName(void) const;\ +public: virtual const varType& get##funName() const;\ public: virtual void set##funName(const varType& var); /** @def CC_SYNTHESIZE_READONLY @@ -147,11 +147,11 @@ public: virtual void set##funName(const varType& var); */ #define CC_SYNTHESIZE_READONLY(varType, varName, funName)\ protected: varType varName;\ -public: virtual varType get##funName(void) const { return varName; } +public: virtual varType get##funName() const { return varName; } #define CC_SYNTHESIZE_READONLY_PASS_BY_REF(varType, varName, funName)\ protected: varType varName;\ -public: virtual const varType& get##funName(void) const { return varName; } +public: virtual const varType& get##funName() const { return varName; } /** @def CC_SYNTHESIZE * It is used to declare a protected variable. @@ -167,17 +167,17 @@ public: virtual const varType& get##funName(void) const { return varName; } */ #define CC_SYNTHESIZE(varType, varName, funName)\ protected: varType varName;\ -public: virtual varType get##funName(void) const { return varName; }\ +public: virtual varType get##funName() const { return varName; }\ public: virtual void set##funName(varType var){ varName = var; } #define CC_SYNTHESIZE_PASS_BY_REF(varType, varName, funName)\ protected: varType varName;\ -public: virtual const varType& get##funName(void) const { return varName; }\ +public: virtual const varType& get##funName() const { return varName; }\ public: virtual void set##funName(const varType& var){ varName = var; } #define CC_SYNTHESIZE_RETAIN(varType, varName, funName) \ private: varType varName; \ -public: virtual varType get##funName(void) const { return varName; } \ +public: virtual varType get##funName() const { return varName; } \ public: virtual void set##funName(varType var) \ { \ if (varName != var) \ diff --git a/native/cocos/platform/CCSAXParser.cpp b/native/cocos/platform/CCSAXParser.cpp index de7c1dbe98..424e2b9d1c 100644 --- a/native/cocos/platform/CCSAXParser.cpp +++ b/native/cocos/platform/CCSAXParser.cpp @@ -92,7 +92,7 @@ SAXParser::SAXParser() _delegator = nullptr; } -SAXParser::~SAXParser(void) +SAXParser::~SAXParser() { } diff --git a/native/cocos/platform/CCSAXParser.h b/native/cocos/platform/CCSAXParser.h index eff8a2c268..3689aa440c 100644 --- a/native/cocos/platform/CCSAXParser.h +++ b/native/cocos/platform/CCSAXParser.h @@ -73,7 +73,7 @@ public: * @js NA * @lua NA */ - ~SAXParser(void); + ~SAXParser(); /** * @js NA * @lua NA diff --git a/native/cocos/platform/apple/CCLock-apple.cpp b/native/cocos/platform/apple/CCLock-apple.cpp index 5a48f4044c..e28e5c7602 100644 --- a/native/cocos/platform/apple/CCLock-apple.cpp +++ b/native/cocos/platform/apple/CCLock-apple.cpp @@ -27,21 +27,21 @@ THE SOFTWARE. NS_CC_BEGIN -Lock::Lock(void) +Lock::Lock() { } -Lock::~Lock(void) +Lock::~Lock() { } -void Lock::lock(void) +void Lock::lock() { } -void Lock::unlock(void) +void Lock::unlock() { } diff --git a/native/cocos/platform/apple/CCLock-apple.h b/native/cocos/platform/apple/CCLock-apple.h index ecfd89bbb8..8a6ea4af57 100644 --- a/native/cocos/platform/apple/CCLock-apple.h +++ b/native/cocos/platform/apple/CCLock-apple.h @@ -36,15 +36,15 @@ public: /** * @js ctor */ - Lock(void); + Lock(); /** * @js NA * @lua NA */ - ~Lock(void); + ~Lock(); - void lock(void); - void unlock(void); + void lock(); + void unlock(); }; NS_CC_END diff --git a/native/cocos/platform/mac/CCApplication-mac.h b/native/cocos/platform/mac/CCApplication-mac.h index 70f8115589..da0b82a65f 100644 --- a/native/cocos/platform/mac/CCApplication-mac.h +++ b/native/cocos/platform/mac/CCApplication-mac.h @@ -99,7 +99,7 @@ public: void setStartupScriptFilename(const std::string& startupScriptFile); - const std::string& getStartupScriptFilename(void); + const std::string& getStartupScriptFilename(); protected: static Application * sm_pSharedApplication; diff --git a/native/cocos/platform/mac/CCApplication-mac.mm b/native/cocos/platform/mac/CCApplication-mac.mm index 4965f53dac..c3732e7975 100644 --- a/native/cocos/platform/mac/CCApplication-mac.mm +++ b/native/cocos/platform/mac/CCApplication-mac.mm @@ -199,7 +199,7 @@ void Application::setStartupScriptFilename(const std::string& startupScriptFile) std::replace(_startupScriptFilename.begin(), _startupScriptFilename.end(), '\\', '/'); } -const std::string& Application::getStartupScriptFilename(void) +const std::string& Application::getStartupScriptFilename() { return _startupScriptFilename; } diff --git a/native/cocos/renderer/CCTextureAtlas.h b/native/cocos/renderer/CCTextureAtlas.h index a2f407cc8d..962752826f 100644 --- a/native/cocos/renderer/CCTextureAtlas.h +++ b/native/cocos/renderer/CCTextureAtlas.h @@ -209,7 +209,7 @@ public: void listenRendererRecreated(EventCustom* event); /** Whether or not the array buffer of the VBO needs to be updated.*/ - inline bool isDirty(void) { return _dirty; } + inline bool isDirty() { return _dirty; } /** Specify if the array buffer of the VBO needs to be updated. */ inline void setDirty(bool bDirty) { _dirty = bDirty; } diff --git a/native/cocos/renderer/ccGLStateCache.cpp b/native/cocos/renderer/ccGLStateCache.cpp index 0ffaeeea57..eb4db6672e 100644 --- a/native/cocos/renderer/ccGLStateCache.cpp +++ b/native/cocos/renderer/ccGLStateCache.cpp @@ -137,7 +137,7 @@ void blendFunc(GLenum sfactor, GLenum dfactor) #endif // CC_ENABLE_GL_STATE_CACHE } -void blendResetToCache(void) +void blendResetToCache() { glBlendEquation(GL_FUNC_ADD); #if CC_ENABLE_GL_STATE_CACHE diff --git a/native/cocos/renderer/ccGLStateCache.h b/native/cocos/renderer/ccGLStateCache.h index abd612683a..082f3339ad 100644 --- a/native/cocos/renderer/ccGLStateCache.h +++ b/native/cocos/renderer/ccGLStateCache.h @@ -64,7 +64,7 @@ enum { * If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache. * @since v2.0.0 */ -void CC_DLL invalidateStateCache(void); +void CC_DLL invalidateStateCache(); /** * Uses the GL program in case program is different than the current one. @@ -96,13 +96,13 @@ void CC_DLL blendFunc(GLenum sfactor, GLenum dfactor); * If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD. * @since v2.0.0 */ -void CC_DLL blendResetToCache(void); +void CC_DLL blendResetToCache(); /** * Sets the projection matrix as dirty. * @since v2.0.0 */ -void CC_DLL setProjectionMatrixDirty(void); +void CC_DLL setProjectionMatrixDirty(); /** * Will enable the vertex attribs that are passed as flags. diff --git a/native/cocos/ui/GUIDefine.h b/native/cocos/ui/GUIDefine.h index 5ed6948835..927b724f51 100644 --- a/native/cocos/ui/GUIDefine.h +++ b/native/cocos/ui/GUIDefine.h @@ -36,10 +36,10 @@ #define DECLARE_CLASS_GUI_INFO \ public: \ static cocos2d::ObjectFactory::TInfo __Type; \ - static cocos2d::Ref* createInstance(void); \ + static cocos2d::Ref* createInstance(); \ #define IMPLEMENT_CLASS_GUI_INFO(className) \ - cocos2d::Ref* className::createInstance(void) \ + cocos2d::Ref* className::createInstance() \ { \ return className::create(); \ } \ @@ -56,10 +56,10 @@ #define DECLARE_CLASS_WIDGET_READER_INFO \ public: \ static cocos2d::ObjectFactory::TInfo __Type; \ - static cocos2d::Ref* createInstance(void); \ + static cocos2d::Ref* createInstance(); \ #define IMPLEMENT_CLASS_WIDGET_READER_INFO(className) \ - cocos2d::Ref* className::createInstance(void) \ + cocos2d::Ref* className::createInstance() \ { \ return className::getInstance(); \ } \ diff --git a/native/cocos/ui/UIEditBox/UIEditBox.cpp b/native/cocos/ui/UIEditBox/UIEditBox.cpp index 53e4c4a872..c882dbeffc 100644 --- a/native/cocos/ui/UIEditBox/UIEditBox.cpp +++ b/native/cocos/ui/UIEditBox/UIEditBox.cpp @@ -32,7 +32,7 @@ namespace ui { static const float CHECK_EDITBOX_POSITION_INTERVAL = 0.1f; -EditBox::EditBox(void) +EditBox::EditBox() : _editBoxImpl(nullptr) , _delegate(nullptr) , _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) @@ -51,7 +51,7 @@ EditBox::EditBox(void) { } -EditBox::~EditBox(void) +EditBox::~EditBox() { CC_SAFE_DELETE(_editBoxImpl); #if CC_ENABLE_SCRIPT_BINDING @@ -189,7 +189,7 @@ void EditBox::setText(const char* pText) } } -const char* EditBox::getText(void) +const char* EditBox::getText() { if (_editBoxImpl != nullptr) { @@ -307,7 +307,7 @@ void EditBox::setPlaceHolder(const char* pText) } } -const char* EditBox::getPlaceHolder(void) +const char* EditBox::getPlaceHolder() { return _placeHolder.c_str(); } @@ -413,7 +413,7 @@ void EditBox::draw(Renderer *renderer, const Mat4 &parentTransform, uint32_t par } } -void EditBox::onEnter(void) +void EditBox::onEnter() { #if CC_ENABLE_SCRIPT_BINDING if (_scriptType == kScriptTypeJavascript) @@ -441,7 +441,7 @@ void EditBox::updatePosition(float dt) } -void EditBox::onExit(void) +void EditBox::onExit() { #if CC_ENABLE_SCRIPT_BINDING if (_scriptType == kScriptTypeJavascript) @@ -516,7 +516,7 @@ void EditBox::registerScriptEditBoxHandler(int handler) _scriptEditBoxHandler = handler; } -void EditBox::unregisterScriptEditBoxHandler(void) +void EditBox::unregisterScriptEditBoxHandler() { if (0 != _scriptEditBoxHandler && ScriptEngineManager::ShareInstance) { diff --git a/native/cocos/ui/UIEditBox/UIEditBox.h b/native/cocos/ui/UIEditBox/UIEditBox.h index f75fc9a185..3c2d10489f 100644 --- a/native/cocos/ui/UIEditBox/UIEditBox.h +++ b/native/cocos/ui/UIEditBox/UIEditBox.h @@ -210,14 +210,14 @@ namespace ui { * @js ctor * @lua new */ - EditBox(void); + EditBox(); /** * Destructor. * @js NA * @lua NA */ - virtual ~EditBox(void); + virtual ~EditBox(); /** * Init edit box with specified size. This method should be invoked right after constructor. @@ -285,13 +285,13 @@ namespace ui { * @js NA * @lua NA */ - void unregisterScriptEditBoxHandler(void); + void unregisterScriptEditBoxHandler(); /** * get a script Handler * @js NA * @lua NA */ - int getScriptEditBoxHandler(void){ return _scriptEditBoxHandler ;} + int getScriptEditBoxHandler(){ return _scriptEditBoxHandler ;} #endif // #if CC_ENABLE_SCRIPT_BINDING @@ -305,7 +305,7 @@ namespace ui { * Get the text entered in the edit box. * @return The text entered in the edit box. */ - const char* getText(void); + const char* getText(); /** * Set the font. Only system font is allowed. @@ -372,7 +372,7 @@ namespace ui { * Get a text in the edit box that acts as a placeholder when an * edit box is empty. */ - const char* getPlaceHolder(void); + const char* getPlaceHolder(); /** * Set the input mode of the edit box. @@ -428,12 +428,12 @@ namespace ui { * @js NA * @lua NA */ - virtual void onEnter(void) override; + virtual void onEnter() override; /** * @js NA * @lua NA */ - virtual void onExit(void) override; + virtual void onExit() override; /** * @js NA * @lua NA diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-common.cpp b/native/cocos/ui/UIEditBox/UIEditBoxImpl-common.cpp index 71f0216a31..3f95cf88ee 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-common.cpp +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-common.cpp @@ -215,7 +215,7 @@ void EditBoxImplCommon::setText(const char* text) refreshInactiveText(); } -const char* EditBoxImplCommon::getText(void) +const char* EditBoxImplCommon::getText() { return _text.c_str(); } @@ -265,7 +265,7 @@ void EditBoxImplCommon::draw(Renderer *renderer, const Mat4 &transform, uint32_t } } -void EditBoxImplCommon::onEnter(void) +void EditBoxImplCommon::onEnter() { const char* pText = getText(); if (pText) { diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h b/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h index 53c47d90de..bbf72dfa80 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.h @@ -76,7 +76,7 @@ public: virtual void nativeCloseKeyboard() override; //need to remove siri text - virtual const char* getText(void)override; + virtual const char* getText()override; virtual void doAnimationWhenKeyboardMove(float duration, float distance) override; private: diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm b/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm index b2c1205e15..93753b52f6 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm @@ -139,7 +139,7 @@ NSString* removeSiriString(NSString* str) return [str stringByReplacingOccurrencesOfString:siriString withString:@""]; } -const char* EditBoxImplIOS::getText(void) +const char* EditBoxImplIOS::getText() { return [removeSiriString(_systemControl.text) UTF8String]; } diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h index d50f9a92e9..d168c452c2 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h @@ -66,7 +66,7 @@ public: virtual bool isEditing() override; virtual void setText(const char* pText) override; - virtual const char* getText(void) override; + virtual const char* getText() override; virtual void setPlaceHolder(const char* pText) override; virtual void setPosition(const Vec2& pos) override; virtual void setVisible(bool visible) override; diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm index f148c23b75..b5072c2b92 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm @@ -488,7 +488,7 @@ void EditBoxImplMac::setText(const char* pText) _sysEdit.secureTextField.stringValue = string; } -const char* EditBoxImplMac::getText(void) +const char* EditBoxImplMac::getText() { if (_sysEdit.secureTextField.superview) { return [_sysEdit.secureTextField.stringValue UTF8String]; @@ -588,7 +588,7 @@ void EditBoxImplMac::closeKeyboard() [_sysEdit closeKeyboard]; } -void EditBoxImplMac::onEnter(void) +void EditBoxImplMac::onEnter() { adjustTextFieldPosition(); } diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index 02b112fd22..b8e4e2d625 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -789,7 +789,7 @@ void EditBoxImplWin::setText(const char* pText) } } -const char* EditBoxImplWin::getText(void) +const char* EditBoxImplWin::getText() { return _text.c_str(); } @@ -923,7 +923,7 @@ void EditBoxImplWin::closeKeyboard() } } -void EditBoxImplWin::onEnter(void) +void EditBoxImplWin::onEnter() { } diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h index 3156248453..e79460408c 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.h @@ -64,7 +64,7 @@ public: virtual bool isEditing(); virtual void setText(const char* pText); - virtual const char* getText(void); + virtual const char* getText(); virtual void setPlaceHolder(const char* pText); virtual void setPosition(const Vec2& pos); virtual void setVisible(bool visible); @@ -82,7 +82,7 @@ public: * @js NA * @lua NA */ - virtual void onEnter(void); + virtual void onEnter(); private: Label* _label; diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl.h b/native/cocos/ui/UIEditBox/UIEditBoxImpl.h index b7c62170b5..ecb591846e 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl.h +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl.h @@ -58,7 +58,7 @@ namespace cocos2d { virtual bool isEditing() = 0; virtual void setText(const char* pText) = 0; - virtual const char* getText(void) = 0; + virtual const char* getText() = 0; virtual void setPlaceHolder(const char* pText) = 0; virtual void doAnimationWhenKeyboardMove(float duration, float distance) = 0; @@ -83,7 +83,7 @@ namespace cocos2d { * @js NA * @lua NA */ - virtual void onEnter(void) = 0; + virtual void onEnter() = 0; void setDelegate(EditBoxDelegate* pDelegate) { _delegate = pDelegate; }; diff --git a/native/cocos/ui/UILayoutParameter.cpp b/native/cocos/ui/UILayoutParameter.cpp index 20e6411d50..4dd4aa09ae 100644 --- a/native/cocos/ui/UILayoutParameter.cpp +++ b/native/cocos/ui/UILayoutParameter.cpp @@ -31,7 +31,7 @@ namespace ui { const Margin Margin::ZERO = Margin(0,0,0,0); -Margin::Margin(void) : left(0), top(0), right(0), bottom(0) +Margin::Margin() : left(0), top(0), right(0), bottom(0) { } diff --git a/native/cocos/ui/UIWidget.h b/native/cocos/ui/UIWidget.h index 44367287ca..e06888331f 100644 --- a/native/cocos/ui/UIWidget.h +++ b/native/cocos/ui/UIWidget.h @@ -156,7 +156,7 @@ public: * @js ctor * @lua new */ - Widget(void); + Widget(); /** * Default destructor diff --git a/native/extensions/GUI/CCControlExtension/CCControl.h b/native/extensions/GUI/CCControlExtension/CCControl.h index 3fb9bc5650..046b642c6b 100644 --- a/native/extensions/GUI/CCControlExtension/CCControl.h +++ b/native/extensions/GUI/CCControlExtension/CCControl.h @@ -185,7 +185,7 @@ CC_CONSTRUCTOR_ACCESS: */ virtual ~Control(); - virtual bool init(void) override; + virtual bool init() override; protected: /** diff --git a/native/extensions/GUI/CCControlExtension/CCControlButton.h b/native/extensions/GUI/CCControlExtension/CCControlButton.h index 924ff6c5bf..97bfaff628 100644 --- a/native/extensions/GUI/CCControlExtension/CCControlButton.h +++ b/native/extensions/GUI/CCControlExtension/CCControlButton.h @@ -60,7 +60,7 @@ public: static ControlButton* create(const std::string& title, const std::string& fontName, float fontSize); static ControlButton* create(Node* label, cocos2d::ui::Scale9Sprite* backgroundSprite, bool adjustBackGroundSize); - virtual void needsLayout(void) override; + virtual void needsLayout() override; virtual void setEnabled(bool enabled) override; virtual void setSelected(bool enabled) override; diff --git a/native/extensions/GUI/CCControlExtension/CCControlSwitch.h b/native/extensions/GUI/CCControlExtension/CCControlSwitch.h index 29f9ee8573..07bb936653 100644 --- a/native/extensions/GUI/CCControlExtension/CCControlSwitch.h +++ b/native/extensions/GUI/CCControlExtension/CCControlSwitch.h @@ -79,7 +79,7 @@ public: */ void setOn(bool isOn, bool animated); void setOn(bool isOn); - bool isOn(void) const { return _on; } + bool isOn() const { return _on; } bool hasMoved() const { return _moved; } virtual void setEnabled(bool enabled) override;