Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cocos/2d/CCAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class CC_DLL Speed : public Action

CC_CONSTRUCTOR_ACCESS:
Speed();
virtual ~Speed(void);
virtual ~Speed();
/** Initializes the action. */
bool initWithAction(ActionInterval *action, float speed);

Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/CCActionEase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool ActionEase::initWithAction(ActionInterval *action)
return false;
}

ActionEase::~ActionEase(void)
ActionEase::~ActionEase()
{
CC_SAFE_RELEASE(_inner);
}
Expand All @@ -82,7 +82,7 @@ void ActionEase::startWithTarget(Node *target)
}
}

void ActionEase::stop(void)
void ActionEase::stop()
{
if (_inner)
_inner->stop();
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCActionGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Rect Grid3DAction::getGridRect() const

// implementation of TiledGrid3DAction

GridBase* TiledGrid3DAction::getGrid(void)
GridBase* TiledGrid3DAction::getGrid()
{
return TiledGrid3D::create(_gridSize, _gridNodeTarget->getGridRect());
}
Expand Down
8 changes: 4 additions & 4 deletions cocos/2d/CCActionInterval.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ class CC_DLL Repeat : public ActionInterval
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() {}
Expand Down Expand Up @@ -321,13 +321,13 @@ class CC_DLL RepeatForever : public ActionInterval
// 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()
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCActionTiledGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ TurnOffTiles* TurnOffTiles::clone() const
return TurnOffTiles::create(_duration, _gridSize, _seed);
}

TurnOffTiles::~TurnOffTiles(void)
TurnOffTiles::~TurnOffTiles()
{
CC_SAFE_DELETE_ARRAY(_tilesOrder);
}
Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/CCAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Animation::Animation()

}

Animation::~Animation(void)
Animation::~Animation()
{
CCLOGINFO("deallocing Animation: %p", this);
}
Expand Down Expand Up @@ -185,7 +185,7 @@ void Animation::addSpriteFrameWithTexture(Texture2D *pobTexture, const Rect& rec
addSpriteFrame(frame);
}

float Animation::getDuration(void) const
float Animation::getDuration() const
{
return _totalDelayUnits * _delayPerUnit;
}
Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/CCAnimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class CC_DLL Animation : public Ref, public Clonable
/** 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".
Expand Down Expand Up @@ -284,7 +284,7 @@ class CC_DLL Animation : public Ref, public Clonable

CC_CONSTRUCTOR_ACCESS:
Animation();
virtual ~Animation(void);
virtual ~Animation();

/** Initializes a Animation. */
bool init();
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCAnimationCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CC_DLL AnimationCache : public Ref
/** @deprecated Use destroyInstance() instead. */
CC_DEPRECATED_ATTRIBUTE static void purgeSharedAnimationCache() { return AnimationCache::destroyInstance(); }

bool init(void);
bool init();

/** Adds a Animation with a name.
*
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCAtlasNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class CC_DLL AtlasNode : public Node, public TextureProtocol
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;
/**
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCFontFNT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ BMFontConfiguration::~BMFontConfiguration()
CC_SAFE_DELETE(_characterSet);
}

std::string BMFontConfiguration::description(void) const
std::string BMFontConfiguration::description() const
{
return StringUtils::format(
"<BMFontConfiguration = " CC_FORMAT_PRINTF_SIZE_T " | Glphys:%d Kernings:%d | Image = %s>",
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ THE SOFTWARE.

NS_CC_BEGIN

Grabber::Grabber(void)
Grabber::Grabber()
: _FBO(0)
, _oldFBO(0)
{
Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/CCGrabber.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ class Grabber : public Ref
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.*/
Expand Down
26 changes: 13 additions & 13 deletions cocos/2d/CCGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ bool GridBase::initWithSize(const Size& gridSize, Texture2D *texture, bool flipp
return ret;
}

GridBase::~GridBase(void)
GridBase::~GridBase()
{
CCLOGINFO("deallocing GridBase: %p", this);

Expand Down Expand Up @@ -218,7 +218,7 @@ void GridBase::setGridRect(const cocos2d::Rect &rect)
_gridRect = rect;
}

void GridBase::beforeDraw(void)
void GridBase::beforeDraw()
{
// save projection
Director *director = Director::getInstance();
Expand Down Expand Up @@ -266,17 +266,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.");
}
Expand Down Expand Up @@ -374,7 +374,7 @@ Grid3D::Grid3D()

}

Grid3D::~Grid3D(void)
Grid3D::~Grid3D()
{
CC_SAFE_FREE(_texCoordinates);
CC_SAFE_FREE(_vertices);
Expand Down Expand Up @@ -415,7 +415,7 @@ void Grid3D::afterBlit()
}
}

void Grid3D::blit(void)
void Grid3D::blit()
{
int n = _gridSize.width * _gridSize.height;

Expand All @@ -436,7 +436,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();
Expand Down Expand Up @@ -546,7 +546,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)
{
Expand All @@ -566,7 +566,7 @@ TiledGrid3D::TiledGrid3D()

}

TiledGrid3D::~TiledGrid3D(void)
TiledGrid3D::~TiledGrid3D()
{
CC_SAFE_FREE(_texCoordinates);
CC_SAFE_FREE(_vertices);
Expand Down Expand Up @@ -654,7 +654,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;

Expand All @@ -678,7 +678,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();
Expand Down Expand Up @@ -789,7 +789,7 @@ Quad3 TiledGrid3D::getTile(const Vec2& pos) const
return ret;
}

void TiledGrid3D::reuse(void)
void TiledGrid3D::reuse()
{
if (_reuseGrid > 0)
{
Expand Down
14 changes: 7 additions & 7 deletions cocos/2d/CCGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class CC_DLL GridBase : public Ref
* @js NA
* @lua NA
*/
virtual ~GridBase(void);
virtual ~GridBase();

/**@{
Init the Grid base.
Expand Down Expand Up @@ -102,7 +102,7 @@ class CC_DLL GridBase : public Ref
/**@{
Init and reset the status when render effects by using the grid.
*/
void beforeDraw(void);
void beforeDraw();
void afterDraw(Node *target);
/**@}*/

Expand All @@ -115,14 +115,14 @@ class CC_DLL GridBase : public Ref
/**@}*/

/**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.
Expand Down Expand Up @@ -172,7 +172,7 @@ class CC_DLL Grid3D : public GridBase
* @js NA
* @lua NA
*/
~Grid3D(void);
~Grid3D();

/** Returns the vertex at a given position.
* @js NA
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ class CC_DLL Label : public Node, public LabelProtocol, public BlendProtocol
bool multilineTextWrapByChar();
bool multilineTextWrapByWord();
bool multilineTextWrap(const std::function<int(const std::u32string&, int, int)>& lambda);
void shrinkLabelToContentSize(const std::function<bool(void)>& lambda);
void shrinkLabelToContentSize(const std::function<bool()>& lambda);
bool isHorizontalClamp();
bool isVerticalClamp();
void rescaleWithOriginalFontSize();
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabelAtlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,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;
}
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabelAtlas.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CC_DLL LabelAtlas : public AtlasNode, public LabelProtocol
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;
/**
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabelTTF.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class CC_DLL CC_DEPRECATED_ATTRIBUTE LabelTTF : public Node, public LabelProtoco
* @warning Changing the string is as expensive as creating a new LabelTTF. To obtain better performance use LabelAtlas
*/
virtual void setString(const std::string &label) override;
virtual const std::string& getString(void) const override ;
virtual const std::string& getString() const override ;

TextHAlignment getHorizontalAlignment() const;
void setHorizontalAlignment(TextHAlignment alignment);
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLabelTextFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ bool Label::isHorizontalClamp()
return letterClamp;
}

void Label::shrinkLabelToContentSize(const std::function<bool(void)>& lambda)
void Label::shrinkLabelToContentSize(const std::function<bool()>& lambda)
{
float fontSize = this->getRenderingFontSize();

Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ void Menu::alignItemsVerticallyWithPadding(float padding)
}
}

void Menu::alignItemsHorizontally(void)
void Menu::alignItemsHorizontally()
{
this->alignItemsHorizontallyWithPadding(kDefaultPadding);
}
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class CC_DLL Menu : public Layer
virtual void onEnter() override;
virtual void onExit() override;
virtual void setOpacityModifyRGB(bool value) override;
virtual bool isOpacityModifyRGB(void) const override;
virtual bool isOpacityModifyRGB() const override;

virtual std::string getDescription() const override;

Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCMenuItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ MenuItemImage* MenuItemImage::create()
return nullptr;
}

bool MenuItemImage::init(void)
bool MenuItemImage::init()
{
return initWithNormalImage("", "", "", (const ccMenuCallback&)nullptr);
}
Expand Down
Loading