Skip to content

Commit

Permalink
Replace some STATIC_CHECK occurences by static_assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Dec 13, 2015
1 parent 56ea0a6 commit f5fa7eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xrServerEntities/object_factory_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ IC void CObjectFactory::add (const CLASS_ID &clsid, LPCSTR script_clsid)
{
{
typedef object_type_traits::is_base_and_derived<ClientObjectBaseClass,_client_type> a;
STATIC_CHECK (a::value,Client_class_must_be_derived_from_the_CLIENT_BASE_CLASS);
static_assert(a::value, "Client object must derive ClientObjectBaseClass");
}
{
typedef object_type_traits::is_base_and_derived<ServerObjectBaseClass,_server_type> a;
STATIC_CHECK (a::value,Server_class_must_be_derived_from_the_SERVER_BASE_CLASS);
static_assert(a::value, "Server object must derive ServerObjectBaseClass");
}
add (xr_new<CObjectItemClientServer<_client_type,_server_type> >(clsid,script_clsid));
}
Expand All @@ -41,7 +41,7 @@ IC void CObjectFactory::add (const CLASS_ID &clsid, LPCSTR script_clsid)
{
typedef object_type_traits::is_base_and_derived<ClientObjectBaseClass,_unknown_type> a;
typedef object_type_traits::is_base_and_derived<ServerObjectBaseClass,_unknown_type> b;
STATIC_CHECK (a::value || b::value,Class_must_be_derived_from_the_CLIENT_BASE_CLASS_or_SERVER_BASE_CLASS);
static_assert(a::value || b::value, "Class must derive ClientObjectBaseClass or ServerObjectBaseClass");
}
add (
xr_new<
Expand Down

0 comments on commit f5fa7eb

Please sign in to comment.