diff --git a/include/Langulus/Mesh.inl b/include/Langulus/Mesh.inl index 0e4a644..63584de 100644 --- a/include/Langulus/Mesh.inl +++ b/include/Langulus/Mesh.inl @@ -722,7 +722,7 @@ namespace Langulus::A else LANGULUS_OOPS(Access, "Unsupported index format"); } - else LANGULUS_ERROR("Unsupported topology"); + else static_assert(false, "Unsupported topology"); } else LANGULUS_OOPS(Access, "Unsupported indexing strategy"); diff --git a/source/Runtime.cpp b/source/Runtime.cpp index f28a100..d92c259 100644 --- a/source/Runtime.cpp +++ b/source/Runtime.cpp @@ -46,7 +46,7 @@ //TODO #endif -#if 1 +#if 0 #define VERBOSE(...) Logger::Verbose(__VA_ARGS__) #else #define VERBOSE(...) LANGULUS(NOOP) diff --git a/source/Thing.cpp b/source/Thing.cpp index 77aa94e..484fbbf 100644 --- a/source/Thing.cpp +++ b/source/Thing.cpp @@ -215,6 +215,9 @@ namespace Langulus::Entity ENTITY_VERBOSE_SELF( "Tearing off unit ", unit, " at ", unit->GetReferences(), " uses..."); unit->mOwners.Remove(this); + + if (unit->mOwners.IsEmpty()) + unit->mOwners.Reset(); } // Propagate Teardown through the hierarchy of Things diff --git a/source/Thing.inl b/source/Thing.inl index 5c801de..871bbab 100644 --- a/source/Thing.inl +++ b/source/Thing.inl @@ -122,7 +122,7 @@ namespace Langulus::Entity } } } - else LANGULUS_ERROR("Unsupported descriptor"); + else static_assert(false, "Unsupported descriptor"); } /// Add a child