`

cocos2dx学习笔记

 
阅读更多

1.Constructors are protected

This patch basically moves all the Constructors, Destructors and init methods to the protected: space.

it also adds the CC_DISALLOW_COPY_AND_ASSIGN macro, and uses this macro in the private:

The patch also fixes other minor issues, like replacing const char* with const std::string&

 

class Layer {
protected:
     Layer();
     virtual ~Layer();
     virtual bool init();
 
 private:
     CC_DISALLOW_COPY_AND_ASSIGN(Layer);
};

 

 

Constructors are protected

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics