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
4 changes: 2 additions & 2 deletions cocos/2d/CCActionCatmullRom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

using namespace std;

NS_CC_BEGIN;
NS_CC_BEGIN

/*
* Implementation of PointArray
Expand Down Expand Up @@ -526,4 +526,4 @@ CatmullRomBy* CatmullRomBy::reverse() const
return CatmullRomBy::create(_duration, reverse);
}

NS_CC_END;
NS_CC_END
4 changes: 2 additions & 2 deletions cocos/2d/CCActionCatmullRom.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "2d/CCActionInterval.h"
#include "math/CCGeometry.h"

NS_CC_BEGIN;
NS_CC_BEGIN

class Node;

Expand Down Expand Up @@ -343,6 +343,6 @@ extern CC_DLL Vec2 ccCardinalSplineAt(const Vec2 &p0, const Vec2 &p1, const Vec2
// end of actions group
/// @}

NS_CC_END;
NS_CC_END

#endif // __CCACTION_CATMULLROM_H__
66 changes: 33 additions & 33 deletions cocos/2d/CCActionEase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,33 +159,33 @@ ActionEase* CLASSNAME::reverse() const { \
return REVERSE_CLASSNAME::create(_inner->reverse()); \
}

EASE_TEMPLATE_IMPL(EaseExponentialIn, tweenfunc::expoEaseIn, EaseExponentialOut);
EASE_TEMPLATE_IMPL(EaseExponentialOut, tweenfunc::expoEaseOut, EaseExponentialIn);
EASE_TEMPLATE_IMPL(EaseExponentialInOut, tweenfunc::expoEaseInOut, EaseExponentialInOut);
EASE_TEMPLATE_IMPL(EaseSineIn, tweenfunc::sineEaseIn, EaseSineOut);
EASE_TEMPLATE_IMPL(EaseSineOut, tweenfunc::sineEaseOut, EaseSineIn);
EASE_TEMPLATE_IMPL(EaseSineInOut, tweenfunc::sineEaseInOut, EaseSineInOut);
EASE_TEMPLATE_IMPL(EaseBounceIn, tweenfunc::bounceEaseIn, EaseBounceOut);
EASE_TEMPLATE_IMPL(EaseBounceOut, tweenfunc::bounceEaseOut, EaseBounceIn);
EASE_TEMPLATE_IMPL(EaseBounceInOut, tweenfunc::bounceEaseInOut, EaseBounceInOut);
EASE_TEMPLATE_IMPL(EaseBackIn, tweenfunc::backEaseIn, EaseBackOut);
EASE_TEMPLATE_IMPL(EaseBackOut, tweenfunc::backEaseOut, EaseBackIn);
EASE_TEMPLATE_IMPL(EaseBackInOut, tweenfunc::backEaseInOut, EaseBackInOut);
EASE_TEMPLATE_IMPL(EaseQuadraticActionIn, tweenfunc::quadraticIn, EaseQuadraticActionIn);
EASE_TEMPLATE_IMPL(EaseQuadraticActionOut, tweenfunc::quadraticOut, EaseQuadraticActionOut);
EASE_TEMPLATE_IMPL(EaseQuadraticActionInOut, tweenfunc::quadraticInOut, EaseQuadraticActionInOut);
EASE_TEMPLATE_IMPL(EaseQuarticActionIn, tweenfunc::quartEaseIn, EaseQuarticActionIn);
EASE_TEMPLATE_IMPL(EaseQuarticActionOut, tweenfunc::quartEaseOut, EaseQuarticActionOut);
EASE_TEMPLATE_IMPL(EaseQuarticActionInOut, tweenfunc::quartEaseInOut, EaseQuarticActionInOut);
EASE_TEMPLATE_IMPL(EaseQuinticActionIn, tweenfunc::quintEaseIn, EaseQuinticActionIn);
EASE_TEMPLATE_IMPL(EaseQuinticActionOut, tweenfunc::quintEaseOut, EaseQuinticActionOut);
EASE_TEMPLATE_IMPL(EaseQuinticActionInOut, tweenfunc::quintEaseInOut, EaseQuinticActionInOut);
EASE_TEMPLATE_IMPL(EaseCircleActionIn, tweenfunc::circEaseIn, EaseCircleActionIn);
EASE_TEMPLATE_IMPL(EaseCircleActionOut, tweenfunc::circEaseOut, EaseCircleActionOut);
EASE_TEMPLATE_IMPL(EaseCircleActionInOut, tweenfunc::circEaseInOut, EaseCircleActionInOut);
EASE_TEMPLATE_IMPL(EaseCubicActionIn, tweenfunc::cubicEaseIn, EaseCubicActionIn);
EASE_TEMPLATE_IMPL(EaseCubicActionOut, tweenfunc::cubicEaseOut, EaseCubicActionOut);
EASE_TEMPLATE_IMPL(EaseCubicActionInOut, tweenfunc::cubicEaseInOut, EaseCubicActionInOut);
EASE_TEMPLATE_IMPL(EaseExponentialIn, tweenfunc::expoEaseIn, EaseExponentialOut)
EASE_TEMPLATE_IMPL(EaseExponentialOut, tweenfunc::expoEaseOut, EaseExponentialIn)
EASE_TEMPLATE_IMPL(EaseExponentialInOut, tweenfunc::expoEaseInOut, EaseExponentialInOut)
EASE_TEMPLATE_IMPL(EaseSineIn, tweenfunc::sineEaseIn, EaseSineOut)
EASE_TEMPLATE_IMPL(EaseSineOut, tweenfunc::sineEaseOut, EaseSineIn)
EASE_TEMPLATE_IMPL(EaseSineInOut, tweenfunc::sineEaseInOut, EaseSineInOut)
EASE_TEMPLATE_IMPL(EaseBounceIn, tweenfunc::bounceEaseIn, EaseBounceOut)
EASE_TEMPLATE_IMPL(EaseBounceOut, tweenfunc::bounceEaseOut, EaseBounceIn)
EASE_TEMPLATE_IMPL(EaseBounceInOut, tweenfunc::bounceEaseInOut, EaseBounceInOut)
EASE_TEMPLATE_IMPL(EaseBackIn, tweenfunc::backEaseIn, EaseBackOut)
EASE_TEMPLATE_IMPL(EaseBackOut, tweenfunc::backEaseOut, EaseBackIn)
EASE_TEMPLATE_IMPL(EaseBackInOut, tweenfunc::backEaseInOut, EaseBackInOut)
EASE_TEMPLATE_IMPL(EaseQuadraticActionIn, tweenfunc::quadraticIn, EaseQuadraticActionIn)
EASE_TEMPLATE_IMPL(EaseQuadraticActionOut, tweenfunc::quadraticOut, EaseQuadraticActionOut)
EASE_TEMPLATE_IMPL(EaseQuadraticActionInOut, tweenfunc::quadraticInOut, EaseQuadraticActionInOut)
EASE_TEMPLATE_IMPL(EaseQuarticActionIn, tweenfunc::quartEaseIn, EaseQuarticActionIn)
EASE_TEMPLATE_IMPL(EaseQuarticActionOut, tweenfunc::quartEaseOut, EaseQuarticActionOut)
EASE_TEMPLATE_IMPL(EaseQuarticActionInOut, tweenfunc::quartEaseInOut, EaseQuarticActionInOut)
EASE_TEMPLATE_IMPL(EaseQuinticActionIn, tweenfunc::quintEaseIn, EaseQuinticActionIn)
EASE_TEMPLATE_IMPL(EaseQuinticActionOut, tweenfunc::quintEaseOut, EaseQuinticActionOut)
EASE_TEMPLATE_IMPL(EaseQuinticActionInOut, tweenfunc::quintEaseInOut, EaseQuinticActionInOut)
EASE_TEMPLATE_IMPL(EaseCircleActionIn, tweenfunc::circEaseIn, EaseCircleActionIn)
EASE_TEMPLATE_IMPL(EaseCircleActionOut, tweenfunc::circEaseOut, EaseCircleActionOut)
EASE_TEMPLATE_IMPL(EaseCircleActionInOut, tweenfunc::circEaseInOut, EaseCircleActionInOut)
EASE_TEMPLATE_IMPL(EaseCubicActionIn, tweenfunc::cubicEaseIn, EaseCubicActionIn)
EASE_TEMPLATE_IMPL(EaseCubicActionOut, tweenfunc::cubicEaseOut, EaseCubicActionOut)
EASE_TEMPLATE_IMPL(EaseCubicActionInOut, tweenfunc::cubicEaseInOut, EaseCubicActionInOut)

//
// NOTE: Converting these macros into Templates is desirable, but please see
Expand Down Expand Up @@ -217,9 +217,9 @@ EaseRateAction* CLASSNAME::reverse() const { \
}

// NOTE: the original code used the same class for the `reverse()` method
EASERATE_TEMPLATE_IMPL(EaseIn, tweenfunc::easeIn);
EASERATE_TEMPLATE_IMPL(EaseOut, tweenfunc::easeOut);
EASERATE_TEMPLATE_IMPL(EaseInOut, tweenfunc::easeInOut);
EASERATE_TEMPLATE_IMPL(EaseIn, tweenfunc::easeIn)
EASERATE_TEMPLATE_IMPL(EaseOut, tweenfunc::easeOut)
EASERATE_TEMPLATE_IMPL(EaseInOut, tweenfunc::easeInOut)

//
// EaseElastic
Expand Down Expand Up @@ -265,9 +265,9 @@ EaseElastic* CLASSNAME::reverse() const { \
return REVERSE_CLASSNAME::create(_inner->reverse(), _period); \
}

EASEELASTIC_TEMPLATE_IMPL(EaseElasticIn, tweenfunc::elasticEaseIn, EaseElasticOut);
EASEELASTIC_TEMPLATE_IMPL(EaseElasticOut, tweenfunc::elasticEaseOut, EaseElasticIn);
EASEELASTIC_TEMPLATE_IMPL(EaseElasticInOut, tweenfunc::elasticEaseInOut, EaseElasticInOut);
EASEELASTIC_TEMPLATE_IMPL(EaseElasticIn, tweenfunc::elasticEaseIn, EaseElasticOut)
EASEELASTIC_TEMPLATE_IMPL(EaseElasticOut, tweenfunc::elasticEaseOut, EaseElasticIn)
EASEELASTIC_TEMPLATE_IMPL(EaseElasticInOut, tweenfunc::elasticEaseInOut, EaseElasticInOut)

//
// EaseBezierAction
Expand Down
10 changes: 5 additions & 5 deletions cocos/2d/CCActionEase.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public: \
virtual ActionEase* reverse() const override; \
private: \
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
};
}

/**
@class EaseExponentialIn
Expand Down Expand Up @@ -394,7 +394,7 @@ private: \
\f${ time }^{ rate }\f$.
@ingroup Actions
*/
EASERATE_TEMPLATE_DECL_CLASS(EaseIn);
EASERATE_TEMPLATE_DECL_CLASS(EaseIn)

/**
@class EaseOut
Expand All @@ -403,7 +403,7 @@ EASERATE_TEMPLATE_DECL_CLASS(EaseIn);
\f${ time }^ { (1/rate) }\f$.
@ingroup Actions
*/
EASERATE_TEMPLATE_DECL_CLASS(EaseOut);
EASERATE_TEMPLATE_DECL_CLASS(EaseOut)

/**
@class EaseInOut
Expand All @@ -414,7 +414,7 @@ EASERATE_TEMPLATE_DECL_CLASS(EaseOut);
\f$1.0-0.5*{ 2-time }^{ rate }\f$.
@ingroup Actions
*/
EASERATE_TEMPLATE_DECL_CLASS(EaseInOut);
EASERATE_TEMPLATE_DECL_CLASS(EaseInOut)

/**
@class EaseElastic
Expand Down Expand Up @@ -472,7 +472,7 @@ public: \
virtual EaseElastic* reverse() const override; \
private: \
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
};
}

/**
@class EaseElasticIn
Expand Down
4 changes: 2 additions & 2 deletions cocos/2d/CCAutoPolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PolygonInfo::PolygonInfo()
triangles.indices = nullptr;
triangles.vertCount = 0;
triangles.indexCount = 0;
};
}

PolygonInfo::PolygonInfo(const PolygonInfo& other)
: triangles()
Expand All @@ -76,7 +76,7 @@ PolygonInfo::PolygonInfo(const PolygonInfo& other)
triangles.indexCount = other.triangles.indexCount;
memcpy(triangles.verts, other.triangles.verts, other.triangles.vertCount * sizeof(other.triangles.verts[0]));
memcpy(triangles.indices, other.triangles.indices, other.triangles.indexCount * sizeof(other.triangles.indices[0]));
};
}

PolygonInfo& PolygonInfo::operator= (const PolygonInfo& other)
{
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCDrawNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool Triangulate::isInsideTriangle(float Ax, float Ay,
bCROSScp = bx*cpy - by*cpx;

return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
};
}

bool Triangulate::checkSnip(const Vec2 *verts,int u,int v,int w,int n,int *V)
{
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCDrawingPrimitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace DrawPrimitives
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL setPointSize(GLfloat pointSize);

};
}

// end of global group
/** @} */
Expand Down
2 changes: 1 addition & 1 deletion cocos/2d/CCLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int Layer::executeScriptTouchesHandler(EventTouch::EventCode eventType, const st
return 0;
}

bool Layer::ccTouchBegan(Touch* /*pTouch*/, Event* /*pEvent*/) {return false;};
bool Layer::ccTouchBegan(Touch* /*pTouch*/, Event* /*pEvent*/) {return false;}
void Layer::ccTouchMoved(Touch* /*pTouch*/, Event* /*pEvent*/) {}
void Layer::ccTouchEnded(Touch* /*pTouch*/, Event* /*pEvent*/) {}
void Layer::ccTouchCancelled(Touch* /*pTouch*/, Event* /*pEvent*/) {}
Expand Down
4 changes: 2 additions & 2 deletions cocos/3d/CCBundleReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ BundleReader::BundleReader()
_buffer = nullptr;
_position = 0;
_length = 0;
};
}

BundleReader::~BundleReader()
{

};
}

void BundleReader::init(char* buffer, ssize_t length)
{
Expand Down
2 changes: 1 addition & 1 deletion cocos/base/CCEventMouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ EventMouse::EventMouse(MouseEventType mouseEventCode)
, _scrollY(0.0f)
, _startPointCaptured(false)
{
};
}

// returns the current touch location in screen coordinates
Vec2 EventMouse::getLocationInView() const
Expand Down
6 changes: 3 additions & 3 deletions cocos/base/CCScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class CC_DLL Scheduler : public Ref
@since v0.99.3
*/
template <class T>
CC_DEPRECATED_ATTRIBUTE void scheduleUpdateForTarget(T* target, int priority, bool paused) { scheduleUpdate(target, priority, paused); };
CC_DEPRECATED_ATTRIBUTE void scheduleUpdateForTarget(T* target, int priority, bool paused) { scheduleUpdate(target, priority, paused); }

/** Unschedule a selector for a given target.
If you want to unschedule the "update", use unscheduleUpdateForTarget.
Expand All @@ -488,13 +488,13 @@ class CC_DLL Scheduler : public Ref
@since v0.99.3
@js NA
*/
CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduled(selector, target); };
CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduled(selector, target); }

/** Unschedules the update selector for a given target
@deprecated Please use 'Scheduler::unscheduleUpdate' instead.
@since v0.99.3
*/
CC_DEPRECATED_ATTRIBUTE void unscheduleUpdateForTarget(Ref *target) { return unscheduleUpdate(target); };
CC_DEPRECATED_ATTRIBUTE void unscheduleUpdateForTarget(Ref *target) { return unscheduleUpdate(target); }

protected:

Expand Down
6 changes: 3 additions & 3 deletions cocos/base/ccRandom.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ inline double random(double min, double max) {
*/
inline int random() {
return cocos2d::random(0, RAND_MAX);
};
}

/**
* Returns a random float between -1 and 1.
Expand All @@ -104,7 +104,7 @@ inline float rand_minus1_1() {
return ((std::rand() / (float)RAND_MAX) * 2) -1;

// return cocos2d::random(-1.f, 1.f);
};
}

/**
* Returns a random float between 0 and 1.
Expand All @@ -118,7 +118,7 @@ inline float rand_0_1() {
return std::rand() / (float)RAND_MAX;

// return cocos2d::random(0.f, 1.f);
};
}


NS_CC_END
Expand Down
2 changes: 1 addition & 1 deletion cocos/base/ccUTF8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ bool utfConvert(
to = std::move(working);

return true;
};
}


bool UTF8ToUTF16(const std::string& utf8, std::u16string& outUtf16)
Expand Down
2 changes: 1 addition & 1 deletion cocos/deprecated/CCDeprecated.h
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLBindTexture2DN(GLuint textureUnit
CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLDeleteTexture(GLuint textureId) { GL::deleteTexture(textureId); }
CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLDeleteTextureN(GLuint textureUnit, GLuint textureId) { GL::deleteTexture(textureId); }
CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLBindVAO(GLuint vaoId) { GL::bindVAO(vaoId); }
CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLEnable( int flags ) { /* ignore */ };
CC_DEPRECATED_ATTRIBUTE inline void CC_DLL ccGLEnable( int flags ) { /* ignore */ }
CC_DEPRECATED_ATTRIBUTE typedef int ccGLServerState;

CC_DEPRECATED_ATTRIBUTE typedef Data CCData;
Expand Down
2 changes: 1 addition & 1 deletion cocos/editor-support/cocosbuilder/CCBReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,4 +1098,4 @@ void CCBReader::setResolutionScale(float scale)
__ccbResolutionScale = scale;
}

};
}
4 changes: 2 additions & 2 deletions cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
using namespace cocos2d;
using namespace cocos2d::extension;

namespace cocosbuilder {;
namespace cocosbuilder {

#define PROPERTY_ZOOMONTOUCHDOWN "zoomOnTouchDown"
#define PROPERTY_TITLE_NORMAL "title|1"
Expand Down Expand Up @@ -139,4 +139,4 @@ void ControlButtonLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, c
}
}

};
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
#ifdef __cplusplus
#define NS_TIMELINE_BEGIN namespace cocostudio { namespace timeline{
#define NS_TIMELINE_END }}
#define USING_NS_TIMELINE using namespace cocostudio::timeline;
#define USING_NS_TIMELINE using namespace cocostudio::timeline
#else
#define NS_TIMELINE_BEGIN
#define NS_TIMELINE_END
Expand Down
2 changes: 1 addition & 1 deletion cocos/editor-support/cocostudio/CCDataReaderHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static std::string readFileContent(const std::string& filename, bool binary) {
else
s = fs->getStringFromFile(filename);
return s;
};
}

namespace cocostudio {

Expand Down
2 changes: 1 addition & 1 deletion cocos/network/SocketIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class CC_DLL SocketIO

friend class SIOClientImpl;
private:
CC_DISALLOW_COPY_AND_ASSIGN(SocketIO)
CC_DISALLOW_COPY_AND_ASSIGN(SocketIO);
};

//c++11 style callbacks entities will be created using CC_CALLBACK (which uses std::bind)
Expand Down
6 changes: 3 additions & 3 deletions cocos/platform/CCGLView.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,20 +378,20 @@ class CC_DLL GLView : public Ref
*
* @param filename A path to image file, e.g., "icons/custom.png".
*/
virtual void setIcon(const std::string& filename) const {};
virtual void setIcon(const std::string& filename) const {}

/** Set window icon (implemented for windows and linux).
* Best icon (based on size) will be auto selected.
*
* @param filelist The array contains icons.
*/
virtual void setIcon(const std::vector<std::string>& filelist) const {};
virtual void setIcon(const std::vector<std::string>& filelist) const {}

/** Set default window icon (implemented for windows and linux).
* On windows it will use icon from .exe file (if included).
* On linux it will use default window icon.
*/
virtual void setDefaultIcon() const {};
virtual void setDefaultIcon() const {}

/**
* Get the opengl view port rectangle.
Expand Down
Loading