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

你可能感兴趣的:(cocos2dx)