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

猜你喜欢

转载自hulefei29.iteye.com/blog/1980750
今日推荐