Fixed some uninitialized variables

This commit is contained in:
Lynix 2018-06-09 13:59:35 +02:00
parent 843e5545b6
commit 0bea301a48
4 changed files with 6 additions and 2 deletions

View File

@ -160,6 +160,7 @@ Nazara Development Kit:
- Fixed Entity::OnEntityDestruction signal not being properly moved and thus not being called. - Fixed Entity::OnEntityDestruction signal not being properly moved and thus not being called.
- Fixed EntityOwner move assignment which was losing entity ownership - Fixed EntityOwner move assignment which was losing entity ownership
- Add GraphicsComponent:ForEachRenderable method - Add GraphicsComponent:ForEachRenderable method
- Fixed GraphicsComponent reflective material count which was not initialized
# 0.4: # 0.4:

View File

@ -28,7 +28,7 @@ namespace Ndk
public: public:
using RenderableList = std::vector<Nz::InstancedRenderableRef>; using RenderableList = std::vector<Nz::InstancedRenderableRef>;
GraphicsComponent(); inline GraphicsComponent();
inline GraphicsComponent(const GraphicsComponent& graphicsComponent); inline GraphicsComponent(const GraphicsComponent& graphicsComponent);
~GraphicsComponent() = default; ~GraphicsComponent() = default;

View File

@ -10,6 +10,7 @@
namespace Ndk namespace Ndk
{ {
inline GraphicsComponent::GraphicsComponent() : inline GraphicsComponent::GraphicsComponent() :
m_reflectiveMaterialCount(0),
m_scissorRect(-1, -1) m_scissorRect(-1, -1)
{ {
} }
@ -22,6 +23,7 @@ namespace Ndk
inline GraphicsComponent::GraphicsComponent(const GraphicsComponent& graphicsComponent) : inline GraphicsComponent::GraphicsComponent(const GraphicsComponent& graphicsComponent) :
Component(graphicsComponent), Component(graphicsComponent),
HandledObject(graphicsComponent), HandledObject(graphicsComponent),
m_reflectiveMaterialCount(0),
m_boundingVolume(graphicsComponent.m_boundingVolume), m_boundingVolume(graphicsComponent.m_boundingVolume),
m_transformMatrix(graphicsComponent.m_transformMatrix), m_transformMatrix(graphicsComponent.m_transformMatrix),
m_boundingVolumeUpdated(graphicsComponent.m_boundingVolumeUpdated), m_boundingVolumeUpdated(graphicsComponent.m_boundingVolumeUpdated),

View File

@ -10,7 +10,8 @@ namespace Nz
{ {
Mesh::Mesh() : Mesh::Mesh() :
m_materialData(1), m_materialData(1),
m_aabbUpdated(false) m_aabbUpdated(false),
m_isValid(false)
{ {
} }