Fix Sprite & GraphicsComponent copy constructors leaving some members uninitialized (#166)
* Fix Sprite copy constructor (corner colors) * Also add change to changelog * [GraphicsComponent] Bugfix: Initialize m_scissorRect in copy ctor * Add change to changelog * Move GraphicsComponent fix change to correct section in Changelog * Use default copy constructor for Sprite
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Nz
|
||||
inline Sprite();
|
||||
inline Sprite(MaterialRef material);
|
||||
inline Sprite(Texture* texture);
|
||||
inline Sprite(const Sprite& sprite);
|
||||
Sprite(const Sprite&) = default;
|
||||
Sprite(Sprite&&) = delete;
|
||||
~Sprite() = default;
|
||||
|
||||
|
||||
@@ -50,21 +50,6 @@ namespace Nz
|
||||
SetTexture(texture, true);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Sprite object by assignation
|
||||
*
|
||||
* \param sprite Sprite to copy into this
|
||||
*/
|
||||
|
||||
inline Sprite::Sprite(const Sprite& sprite) :
|
||||
InstancedRenderable(sprite),
|
||||
m_color(sprite.m_color),
|
||||
m_textureCoords(sprite.m_textureCoords),
|
||||
m_size(sprite.m_size),
|
||||
m_origin(sprite.m_origin)
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gets the color of the sprite
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user