Merge pull request #6671 from dumganhar/deprecate-cpp-warning-fix

Warning fix in CCDeprecated.cpp and CCGLProgramState.h
This commit is contained in:
James Chen 2014-05-11 12:35:51 +08:00
commit 9bd59de3de
3 changed files with 50 additions and 23 deletions

View File

@ -25,6 +25,13 @@
#include "cocos2d.h"
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
NS_CC_BEGIN
const Vector2 CCPointZero = Vector2::ZERO;
@ -568,4 +575,24 @@ Vector4* kmVec4Transform(Vector4* pOut, const Vector4* pV, const Matrix* pM)
return pOut;
}
const Vector3 KM_VEC3_NEG_Z = Vector3(0, 0, -1);
const Vector3 KM_VEC3_POS_Z = Vector3(0, 0, 1);
const Vector3 KM_VEC3_POS_Y = Vector3(0, 1, 0);
const Vector3 KM_VEC3_NEG_Y = Vector3(0, -1, 0);
const Vector3 KM_VEC3_NEG_X = Vector3(-1, 0, 0);
const Vector3 KM_VEC3_POS_X = Vector3(1, 0, 0);
const Vector3 KM_VEC3_ZERO = Vector3(0, 0, 0);
const Vector2 KM_VEC2_POS_Y = Vector2(0, 1);
const Vector2 KM_VEC2_NEG_Y = Vector2(0, -1);
const Vector2 KM_VEC2_NEG_X = Vector2(-1, 0);
const Vector2 KM_VEC2_POS_X = Vector2(1, 0);
const Vector2 KM_VEC2_ZERO = Vector2(0, 0);
NS_CC_END
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif

View File

@ -1110,13 +1110,13 @@ CC_DEPRECATED_ATTRIBUTE CC_DLL Vector3* kmVec3Scale(Vector3* pOut, const Vector3
CC_DEPRECATED_ATTRIBUTE CC_DLL Vector3* kmVec3Assign(Vector3* pOut, const Vector3* pIn);
CC_DEPRECATED_ATTRIBUTE CC_DLL Vector3* kmVec3Zero(Vector3* pOut);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_NEG_Z = Vector3(0, 0, -1);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_POS_Z = Vector3(0, 0, 1);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_POS_Y = Vector3(0, 1, 0);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_NEG_Y = Vector3(0, -1, 0);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_NEG_X = Vector3(-1, 0, 0);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_POS_X = Vector3(1, 0, 0);
CC_DEPRECATED_ATTRIBUTE const Vector3 KM_VEC3_ZERO = Vector3(0, 0, 0);
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_NEG_Z;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_POS_Z;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_POS_Y;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_NEG_Y;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_NEG_X;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_POS_X;
CC_DEPRECATED_ATTRIBUTE extern const Vector3 KM_VEC3_ZERO;
//kmVec2
CC_DEPRECATED_ATTRIBUTE typedef Vector2 kmVec2;
@ -1131,11 +1131,11 @@ CC_DEPRECATED_ATTRIBUTE CC_DLL Vector2* kmVec2Subtract(Vector2* pOut, const Vect
CC_DEPRECATED_ATTRIBUTE CC_DLL Vector2* kmVec2Scale(Vector2* pOut, const Vector2* pIn, const float s);
CC_DEPRECATED_ATTRIBUTE CC_DLL Vector2* kmVec2Assign(Vector2* pOut, const Vector2* pIn);
CC_DEPRECATED_ATTRIBUTE const Vector2 KM_VEC2_POS_Y = Vector2(0, 1);
CC_DEPRECATED_ATTRIBUTE const Vector2 KM_VEC2_NEG_Y = Vector2(0, -1);
CC_DEPRECATED_ATTRIBUTE const Vector2 KM_VEC2_NEG_X = Vector2(-1, 0);
CC_DEPRECATED_ATTRIBUTE const Vector2 KM_VEC2_POS_X = Vector2(1, 0);
CC_DEPRECATED_ATTRIBUTE const Vector2 KM_VEC2_ZERO = Vector2(0, 0);
CC_DEPRECATED_ATTRIBUTE extern const Vector2 KM_VEC2_POS_Y;
CC_DEPRECATED_ATTRIBUTE extern const Vector2 KM_VEC2_NEG_Y;
CC_DEPRECATED_ATTRIBUTE extern const Vector2 KM_VEC2_NEG_X;
CC_DEPRECATED_ATTRIBUTE extern const Vector2 KM_VEC2_POS_X;
CC_DEPRECATED_ATTRIBUTE extern const Vector2 KM_VEC2_ZERO;
//kmVec4
CC_DEPRECATED_ATTRIBUTE typedef Vector4 kmVec4;

View File

@ -36,8 +36,8 @@ THE SOFTWARE.
NS_CC_BEGIN
class GLProgram;
class Uniform;
class VertexAttrib;
struct Uniform;
struct VertexAttrib;
//
//