From f60ce60cd5d1aa165aad7d11c9fdf1482e6122a6 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 30 Jul 2016 15:50:02 +0200 Subject: [PATCH] Sdk: Components no longer need to be default-constructibles Former-commit-id: 7fffb2029784fc5361e560e3568d4c739f433a91 [formerly 14435fa68c516f1d16b2c474bef81f9a465cd7be] Former-commit-id: 8a14c5defaabc15e92ef8e2854de5598683e27ac --- SDK/include/NDK/Component.inl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SDK/include/NDK/Component.inl b/SDK/include/NDK/Component.inl index e39091224..833395957 100644 --- a/SDK/include/NDK/Component.inl +++ b/SDK/include/NDK/Component.inl @@ -28,13 +28,11 @@ namespace Ndk template ComponentIndex Component::RegisterComponent(ComponentId id) { - // Il faut que notre composant possède un constructeur par défaut (pour la factory) - static_assert(std::is_default_constructible::value, "ComponentType must be default-constructible"); - // On utilise les lambda pour créer une fonction factory auto factory = []() -> BaseComponent* { - return new ComponentType; + return nullptr; //< Temporary workaround to allow non-default-constructed components, will be updated for serialization + //return new ComponentType; }; return BaseComponent::RegisterComponent(id, factory);