assert -> ENTT_ASSERT

This commit is contained in:
Michele Caini
2019-05-15 23:23:06 +02:00
parent 30f71b2ed6
commit cac1b87b44
2 changed files with 3 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ class basic_registry {
template<typename... Args>
decltype(auto) replace(basic_registry &registry, const Entity entt, Args &&... args) {
if constexpr(std::is_empty_v<Component>) {
assert((storage<Entity, Component>::has(entt)));
ENTT_ASSERT((storage<Entity, Component>::has(entt)));
on_replace.publish(registry, entt, Component{});
return Component{std::forward<Args>(args)...};
} else {

View File

@@ -1251,7 +1251,7 @@ public:
*/
template<typename Type>
inline bool set(meta_handle handle, std::size_t index, Type &&value) const {
assert(index < node->type()->extent);
ENTT_ASSERT(index < node->type()->extent);
return node->set(handle, index, std::forward<Type>(value));
}
@@ -1279,7 +1279,7 @@ public:
* @return A meta any containing the value of the underlying element.
*/
inline meta_any get(meta_handle handle, std::size_t index) const ENTT_NOEXCEPT {
assert(index < node->type()->extent);
ENTT_ASSERT(index < node->type()->extent);
return node->get(handle, index);
}