Browse Source

Physics: better diagnostics in ShapeGroup::get().

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
b063461a73
  1. 4
      src/Physics/ShapeGroup.h

4
src/Physics/ShapeGroup.h

@ -288,8 +288,8 @@ template<UnsignedInt dimensions> template<class T, class U> ShapeGroup<dimension
template<UnsignedInt dimensions> template<class T> inline const T& ShapeGroup<dimensions>::get(std::size_t i) const { template<UnsignedInt dimensions> template<class T> inline const T& ShapeGroup<dimensions>::get(std::size_t i) const {
CORRADE_ASSERT(_shapes[i]->type() == Implementation::TypeOf<T>::type(), CORRADE_ASSERT(_shapes[i]->type() == Implementation::TypeOf<T>::type(),
"Physics::ShapeGroup::get(): given shape is not of type" << Implementation::TypeOf<T>::type(), "Physics::ShapeGroup::get(): given shape is not of type" << Implementation::TypeOf<T>::type() <<
*static_cast<T*>(nullptr)); "but" << _shapes[i]->type(), *static_cast<T*>(nullptr));
return static_cast<Implementation::Shape<T>*>(_shapes[i])->shape; return static_cast<Implementation::Shape<T>*>(_shapes[i])->shape;
} }

Loading…
Cancel
Save