diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 9855d2e195..8acd8f93f3 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -410,6 +410,11 @@ std::string Layer::getDescription() const return StringUtils::format("", _tag); } +__LayerRGBA::__LayerRGBA() +{ + CCLOG("LayerRGBA deprecated."); +} + #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #pragma GCC diagnostic warning "-Wdeprecated-declarations" diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 2e4f43627f..73b4ad66f3 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -222,7 +222,7 @@ public: virtual bool isOpacityModifyRGB() const override { return Layer::isOpacityModifyRGB(); } protected: - __LayerRGBA() {} + __LayerRGBA(); virtual ~__LayerRGBA() {} private: diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index e0a8bc8ab4..893dcb7fa4 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1570,4 +1570,9 @@ void Node::disableCascadeColor() }); } +__NodeRGBA::__NodeRGBA() +{ + CCLOG("NodeRGBA deprecated."); +} + NS_CC_END diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 263b6f021a..0adf862484 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1545,7 +1545,7 @@ public: virtual bool isOpacityModifyRGB() const override { return Node::isOpacityModifyRGB(); } protected: - CC_DEPRECATED_ATTRIBUTE __NodeRGBA() { CCLOG("NodeRGBA deprecated.");} + __NodeRGBA(); virtual ~__NodeRGBA() {} private: