Ndk/Component: Modified comment and error messages
Former-commit-id: 6a5fad6d2b7e3c1dbc58df0a1614012eee4df2b7
This commit is contained in:
parent
1e30f0c757
commit
55519b5e31
|
|
@ -132,5 +132,4 @@ namespace Ndk
|
|||
{
|
||||
// Rien à faire
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Ndk
|
|||
BaseComponent* Component<ComponentType>::Clone() const
|
||||
{
|
||||
///FIXME: Pas encore supporté par GCC (4.9.2)
|
||||
//static_assert(std::is_trivially_copy_constructible<ComponentType>::value, "ComponentType should be copy-constructible");
|
||||
//static_assert(std::is_trivially_copy_constructible<ComponentType>::value, "ComponentType must be copy-constructible");
|
||||
|
||||
return new ComponentType(static_cast<const ComponentType&>(*this));
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ namespace Ndk
|
|||
ComponentIndex Component<ComponentType>::RegisterComponent(ComponentId id)
|
||||
{
|
||||
// Il faut que notre composant possède un constructeur par défaut (pour la factory)
|
||||
static_assert(std::is_default_constructible<ComponentType>::value, "ComponentType should be default-constructible");
|
||||
static_assert(std::is_default_constructible<ComponentType>::value, "ComponentType must be default-constructible");
|
||||
|
||||
// On utilise les lambda pour créer une fonction factory
|
||||
auto factory = []() -> BaseComponent*
|
||||
|
|
@ -37,8 +37,6 @@ namespace Ndk
|
|||
return new ComponentType;
|
||||
};
|
||||
|
||||
// Je ne sais pas si c'est un bug de GCC ou si c'est quelque chose que j'ai mal compris
|
||||
// mais le fait est que ça ne compile pas si je ne précise pas Basecomponent::
|
||||
return BaseComponent::RegisterComponent(id, factory);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue