From 7c73407fa446be4f6a93c078659a43e253559def Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 1 Mar 2015 13:41:44 +0100 Subject: [PATCH] (Component) Fixed Clone method Former-commit-id: afa38a9b684f045dc3cf0d072736ebb6c47e4bd7 --- SDK/include/NDK/Component.hpp | 5 ++--- SDK/include/NDK/Component.inl | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SDK/include/NDK/Component.hpp b/SDK/include/NDK/Component.hpp index d06a160a1..5c3141502 100644 --- a/SDK/include/NDK/Component.hpp +++ b/SDK/include/NDK/Component.hpp @@ -19,11 +19,10 @@ namespace Ndk Component(); virtual ~Component(); - virtual BaseComponent* Clone() const override; + BaseComponent* Clone() const override; }; - template - constexpr nzUInt32 GetComponentId(); + template constexpr nzUInt32 GetComponentId(); } #include diff --git a/SDK/include/NDK/Component.inl b/SDK/include/NDK/Component.inl index 34314f84f..357c7f594 100644 --- a/SDK/include/NDK/Component.inl +++ b/SDK/include/NDK/Component.inl @@ -16,11 +16,12 @@ namespace Ndk Component::~Component() = default; template - virtual BaseComponent* Component::Clone() const + BaseComponent* Component::Clone() const { - static_assert::value, "ComponentType should be copy-constructible"> + ///FIXME: Pas encore supporté par GCC (4.9.2) + //static_assert(std::is_trivially_copy_constructible::value, "ComponentType should be copy-constructible"); - return new ComponentType(static_cast(*this)); + return new ComponentType(static_cast(*this)); } template