diff --git a/include/Nazara/Graphics/Renderable.hpp b/include/Nazara/Graphics/Renderable.hpp index 57fa755ed..5545b978d 100644 --- a/include/Nazara/Graphics/Renderable.hpp +++ b/include/Nazara/Graphics/Renderable.hpp @@ -30,22 +30,22 @@ class NAZARA_API NzRenderable : public NzRefCounted { public: NzRenderable() = default; - NzRenderable(const NzRenderable& renderable); + inline NzRenderable(const NzRenderable& renderable); virtual ~NzRenderable(); - void EnsureBoundingVolumeUpdated() const; + inline void EnsureBoundingVolumeUpdated() const; virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0; virtual bool Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const; virtual const NzBoundingVolumef& GetBoundingVolume() const; virtual void UpdateBoundingVolume(NzBoundingVolumef* boundingVolume, const NzMatrix4f& transformMatrix) const; - NzRenderable& operator=(const NzRenderable& renderable); + inline NzRenderable& operator=(const NzRenderable& renderable); protected: virtual void MakeBoundingVolume() const = 0; void InvalidateBoundingVolume(); - void UpdateBoundingVolume() const; + inline void UpdateBoundingVolume() const; mutable NzBoundingVolumef m_boundingVolume; diff --git a/include/Nazara/Graphics/Renderable.inl b/include/Nazara/Graphics/Renderable.inl index 52fddeafa..cebf623a1 100644 --- a/include/Nazara/Graphics/Renderable.inl +++ b/include/Nazara/Graphics/Renderable.inl @@ -19,14 +19,16 @@ inline void NzRenderable::InvalidateBoundingVolume() m_boundingVolumeUpdated = false; } +inline NzRenderable& NzRenderable::operator=(const NzRenderable& renderable) +{ + m_boundingVolume = renderable.m_boundingVolume; + m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated; + + return *this; +} + inline void NzRenderable::UpdateBoundingVolume() const { MakeBoundingVolume(); m_boundingVolumeUpdated = true; } - -inline NzRenderable& NzRenderable::operator=(const NzRenderable& renderable) -{ - m_boundingVolume = renderable.m_boundingVolume; - m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated; -}