Quellcode durchsuchen

Removed the copy constructor implementation for classes that wanted to hide it.
To hide a copy constructor, you only need to make it private and NOT define an implementation for the copy constructor.

Darryl Gough vor 13 Jahren
Ursprung
Commit
c47cc81178

+ 0 - 4
gameplay/src/AbsoluteLayout.cpp

@@ -12,10 +12,6 @@ AbsoluteLayout::AbsoluteLayout()
 {
 }
 
-AbsoluteLayout::AbsoluteLayout(const AbsoluteLayout& copy)
-{
-}
-
 AbsoluteLayout::~AbsoluteLayout()
 {
     __instance = NULL;

+ 0 - 5
gameplay/src/CheckBox.cpp

@@ -9,11 +9,6 @@ CheckBox::CheckBox() : _checked(false), _image(NULL)
 {
 }
 
-CheckBox::CheckBox(const CheckBox& copy)
-{
-    // Hidden.
-}
-
 CheckBox::~CheckBox()
 {
 

+ 0 - 4
gameplay/src/Container.cpp

@@ -35,10 +35,6 @@ Container::Container()
 {
 }
 
-Container::Container(const Container& copy)
-{
-}
-
 Container::~Container()
 {
     std::vector<Control*>::iterator it;

+ 0 - 4
gameplay/src/Control.cpp

@@ -12,10 +12,6 @@ Control::Control()
 {
 }
 
-Control::Control(const Control& copy)
-{
-}
-
 Control::~Control()
 {
     if (_listeners)

+ 0 - 5
gameplay/src/Effect.cpp

@@ -567,11 +567,6 @@ Uniform::Uniform() :
 {
 }
 
-Uniform::Uniform(const Uniform& copy)
-{
-    // hidden
-}
-
 Uniform::~Uniform()
 {
     // hidden

+ 0 - 4
gameplay/src/FlowLayout.cpp

@@ -12,10 +12,6 @@ FlowLayout::FlowLayout()
 {
 }
 
-FlowLayout::FlowLayout(const FlowLayout& copy)
-{
-}
-
 FlowLayout::~FlowLayout()
 {
     __instance = NULL;

+ 0 - 5
gameplay/src/Font.cpp

@@ -45,11 +45,6 @@ Font::Font() :
 {
 }
 
-Font::Font(const Font& copy)
-{
-    // hidden
-}
-
 Font::~Font()
 {
     // Remove this Font from the font cache.

+ 0 - 4
gameplay/src/Form.cpp

@@ -42,10 +42,6 @@ Form::Form() : _theme(NULL), _frameBuffer(NULL), _spriteBatch(NULL), _node(NULL)
 {
 }
 
-Form::Form(const Form& copy)
-{
-}
-
 Form::~Form()
 {
     SAFE_RELEASE(_node);

+ 0 - 4
gameplay/src/Game.cpp

@@ -26,10 +26,6 @@ Game::Game()
     _timeEvents = new std::priority_queue<TimeEvent, std::vector<TimeEvent>, std::less<TimeEvent> >();
 }
 
-Game::Game(const Game& copy)
-{
-}
-
 Game::~Game()
 {
     // Do not call any virtual functions from the destructor.

+ 0 - 4
gameplay/src/Joystick.cpp

@@ -8,10 +8,6 @@ Joystick::Joystick() : _absolute(true)
 {
 }
 
-Joystick::Joystick(const Joystick& copy)
-{
-}
-
 Joystick::~Joystick()
 {
 }

+ 0 - 4
gameplay/src/Label.cpp

@@ -8,10 +8,6 @@ Label::Label() : _text(""), _font(NULL)
 {
 }
 
-Label::Label(const Label& copy)
-{
-}
-
 Label::~Label()
 {
 }

+ 0 - 4
gameplay/src/Material.cpp

@@ -15,10 +15,6 @@ Material::Material() :
 {
 }
 
-Material::Material(const Material& m)
-{
-}
-
 Material::~Material()
 {
     // Destroy all the techniques.

+ 0 - 8
gameplay/src/Mesh.cpp

@@ -14,14 +14,6 @@ Mesh::Mesh(const VertexFormat& vertexFormat)
 {
 }
 
-Mesh::Mesh(const Mesh& copy) :
-    _vertexFormat(copy._vertexFormat), _vertexCount(copy._vertexCount), _vertexBuffer(copy._vertexBuffer),
-    _primitiveType(copy._primitiveType), _partCount(copy._partCount), _parts(copy._parts), _dynamic(copy._dynamic),
-    _boundingBox(copy._boundingBox), _boundingSphere(copy._boundingSphere)
-{
-    // hidden
-}
-
 Mesh::~Mesh()
 {
     if (_parts)

+ 0 - 6
gameplay/src/MeshBatch.cpp

@@ -11,12 +11,6 @@ MeshBatch::MeshBatch(const VertexFormat& vertexFormat, Mesh::PrimitiveType primi
     resize(initialCapacity);
 }
 
-MeshBatch::MeshBatch(const MeshBatch& copy)
-    : _vertexFormat(copy._vertexFormat)
-{
-    // hidden
-}
-
 MeshBatch::~MeshBatch()
 {
     SAFE_RELEASE(_material);

+ 6 - 1
gameplay/src/MeshBatch.h

@@ -120,10 +120,15 @@ private:
     MeshBatch(const VertexFormat& vertexFormat, Mesh::PrimitiveType primitiveType, Material* material, bool indexed, unsigned int initialCapacity, unsigned int growSize);
 
     /**
-     * Constructor.
+     * Hidden copy constructor.
      */
     MeshBatch(const MeshBatch& copy);
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    MeshBatch& operator=(const MeshBatch&);
+
     void updateVertexAttributeBinding();
 
     bool resize(unsigned int capacity);

+ 0 - 4
gameplay/src/MeshPart.cpp

@@ -9,10 +9,6 @@ MeshPart::MeshPart() :
 {
 }
 
-MeshPart::MeshPart(const MeshPart& copy)
-{
-}
-
 MeshPart::~MeshPart()
 {
     if (_indexBuffer)

+ 0 - 5
gameplay/src/PhysicsCollisionShape.cpp

@@ -12,11 +12,6 @@ PhysicsCollisionShape::PhysicsCollisionShape(Type type, btCollisionShape* shape)
     memset(&_shapeData, 0, sizeof(_shapeData));
 }
 
-PhysicsCollisionShape::PhysicsCollisionShape(const PhysicsCollisionShape& copy)
-{
-    // hidden
-}
-
 PhysicsCollisionShape::~PhysicsCollisionShape()
 {
     if (_shape)

+ 0 - 5
gameplay/src/PlatformAndroid.cpp

@@ -706,11 +706,6 @@ Platform::Platform(Game* game)
 {
 }
 
-Platform::Platform(const Platform& copy)
-{
-    // hidden
-}
-
 Platform::~Platform()
 {
 }

+ 0 - 4
gameplay/src/PlatformMacOSX.mm

@@ -631,10 +631,6 @@ Platform::Platform(Game* game)
 {
 }
 
-Platform::Platform(const Platform& copy)
-{
-}
-
 Platform::~Platform()
 {
 }

+ 0 - 5
gameplay/src/PlatformQNX.cpp

@@ -439,11 +439,6 @@ Platform::Platform(Game* game)
 {
 }
 
-Platform::Platform(const Platform& copy)
-{
-    // hidden
-}
-
 Platform::~Platform()
 {
     if (__eglDisplay != EGL_NO_DISPLAY)

+ 0 - 5
gameplay/src/PlatformWin32.cpp

@@ -464,11 +464,6 @@ Platform::Platform(Game* game)
 {
 }
 
-Platform::Platform(const Platform& copy)
-{
-    // hidden
-}
-
 Platform::~Platform()
 {
     if (__hwnd)

+ 0 - 4
gameplay/src/PlatformiOS.mm

@@ -825,10 +825,6 @@ Platform::Platform(Game* game) : _game(game)
 {
 }
 
-Platform::Platform(const Platform& copy)
-{
-}
-
 Platform::~Platform()
 {
 }

+ 0 - 5
gameplay/src/RadioButton.cpp

@@ -9,11 +9,6 @@ RadioButton::RadioButton() : _selected(false)
 {
 }
 
-RadioButton::RadioButton(const RadioButton& copy)
-{
-    // Hidden.
-}
-
 RadioButton::~RadioButton()
 {
     // Remove this RadioButton from the global list.

+ 0 - 4
gameplay/src/Scene.cpp

@@ -12,10 +12,6 @@ Scene::Scene() : _activeCamera(NULL), _firstNode(NULL), _lastNode(NULL), _nodeCo
 {
 }
 
-Scene::Scene(const Scene& copy)
-{
-}
-
 Scene::~Scene()
 {
     // Unbind our active camera from the audio listener

+ 0 - 5
gameplay/src/SpriteBatch.cpp

@@ -52,11 +52,6 @@ SpriteBatch::SpriteBatch()
 {
 }
 
-SpriteBatch::SpriteBatch(const SpriteBatch& copy)
-{
-    // hiddden
-}
-
 SpriteBatch::~SpriteBatch()
 {
     SAFE_DELETE(_batch);

+ 0 - 4
gameplay/src/TextBox.cpp

@@ -8,10 +8,6 @@ TextBox::TextBox() : _lastKeypress(0)
 {
 }
 
-TextBox::TextBox(const TextBox& copy)
-{
-}
-
 TextBox::~TextBox()
 {
 }

+ 0 - 4
gameplay/src/Texture.cpp

@@ -48,10 +48,6 @@ Texture::Texture() : _handle(0), _format(RGBA), _width(0), _height(0), _mipmappe
 {
 }
 
-Texture::Texture(const Texture& copy)
-{
-}
-
 Texture::~Texture()
 {
     if (_handle)

+ 0 - 4
gameplay/src/Theme.cpp

@@ -11,10 +11,6 @@ Theme::Theme()
 {
 }
 
-Theme::Theme(const Theme& theme)
-{
-}
-
 Theme::~Theme()
 {
     // Destroy all the cursors, styles and , fonts.

+ 0 - 4
gameplay/src/VerticalLayout.cpp

@@ -10,10 +10,6 @@ VerticalLayout::VerticalLayout() : _bottomToTop(false)
 {
 }
 
-VerticalLayout::VerticalLayout(const VerticalLayout& copy)
-{
-}
-
 VerticalLayout::~VerticalLayout()
 {
     __instance = NULL;