From e950118263d934b713ef1a395884914d05877fac 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: 995fb3dc8acff9b298603740812e9f689d800162 [formerly d67c4d851d711a0c26dd0967a9bcfa6bf5564061] Former-commit-id: bb864925dcb9541615c6bac341a851ddffd75ac5 --- 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);