Browse Source

Adapted to Corrade changes.

catastrophic-cross
Vladimír Vondruš 6 years ago
parent
commit
d3f2235759
  1. 8
      src/Magnum/Animation/Interpolation.cpp
  2. 4
      src/Magnum/Animation/Interpolation.h
  3. 2
      src/Magnum/Animation/Player.hpp
  4. 4
      src/Magnum/DebugTools/CompareImage.cpp
  5. 4
      src/Magnum/GL/AbstractFramebuffer.cpp
  6. 2
      src/Magnum/GL/AbstractObject.cpp
  7. 8
      src/Magnum/GL/AbstractTexture.cpp
  8. 16
      src/Magnum/GL/Attribute.cpp
  9. 2
      src/Magnum/GL/Context.cpp
  10. 2
      src/Magnum/GL/Implementation/BufferState.cpp
  11. 2
      src/Magnum/GL/Mesh.cpp
  12. 2
      src/Magnum/GL/PixelFormat.cpp
  13. 4
      src/Magnum/GL/Shader.cpp
  14. 48
      src/Magnum/GL/Test/MeshGLTest.cpp
  15. 2
      src/Magnum/Math/Color.h
  16. 2
      src/Magnum/Mesh.cpp
  17. 2
      src/Magnum/MeshTools/GenerateNormals.cpp
  18. 2
      src/Magnum/Platform/Sdl2Application.cpp
  19. 2
      src/Magnum/Trade/AbstractImporter.cpp
  20. 2
      src/Magnum/Trade/AnimationData.cpp
  21. 18
      src/Magnum/Trade/MeshData.cpp
  22. 2
      src/Magnum/VertexFormat.cpp
  23. 2
      src/MagnumPlugins/MagnumFontConverter/Test/MagnumFontConverterTest.cpp
  24. 2
      src/MagnumPlugins/ObjImporter/ObjImporter.cpp

8
src/Magnum/Animation/Interpolation.cpp

@ -76,7 +76,7 @@ template<class T> auto TypeTraits<Math::Complex<T>, Math::Complex<T>>::interpola
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
template<class T> auto TypeTraits<Math::Quaternion<T>, Math::Quaternion<T>>::interpolator(Interpolation interpolation) -> Interpolator {
@ -88,7 +88,7 @@ template<class T> auto TypeTraits<Math::Quaternion<T>, Math::Quaternion<T>>::int
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
template<class T> auto TypeTraits<Math::DualQuaternion<T>, Math::DualQuaternion<T>>::interpolator(Interpolation interpolation) -> Interpolator {
@ -100,7 +100,7 @@ template<class T> auto TypeTraits<Math::DualQuaternion<T>, Math::DualQuaternion<
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
template<class T> auto TypeTraits<Math::CubicHermite<T>, T>::interpolator(Interpolation interpolation) -> Interpolator {
@ -112,7 +112,7 @@ template<class T> auto TypeTraits<Math::CubicHermite<T>, T>::interpolator(Interp
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
template struct MAGNUM_EXPORT TypeTraits<Math::Complex<Float>, Math::Complex<Float>>;

4
src/Magnum/Animation/Interpolation.h

@ -315,7 +315,7 @@ template<class V> auto TypeTraits<V, V>::interpolator(Interpolation interpolatio
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
/* Specialization for booleans (no linear interpolation) */
@ -333,7 +333,7 @@ template<class T> auto TypeTraitsBool<T>::interpolator(Interpolation interpolati
case Interpolation::Custom: ; /* nope */
}
CORRADE_ASSERT(false, "Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
CORRADE_ASSERT_UNREACHABLE("Animation::interpolatorFor(): can't deduce interpolator function for" << interpolation, {});
}
template<> struct TypeTraits<bool, bool>: TypeTraitsBool<bool> {};
template<std::size_t size> struct TypeTraits<Math::BoolVector<size>, Math::BoolVector<size>>: TypeTraitsBool<Math::BoolVector<size>> {};

2
src/Magnum/Animation/Player.hpp

@ -191,7 +191,7 @@ template<class T, class K> Player<T, K>& Player<T, K>::setState(State state, T t
case State::Stopped: return stop();
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
namespace Implementation {

4
src/Magnum/DebugTools/CompareImage.cpp

@ -312,7 +312,7 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D<const char>&
case PixelFormat::RGB16F:
case PixelFormat::RGBA16F:
/* Already handled by a printing assert before */
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
@ -671,7 +671,7 @@ void ImageComparatorBase::printMessage(const TestSuite::ComparisonStatusFlags fl
<< Debug::nospace << _state->mean << "below threshold"
<< _state->maxThreshold << Debug::nospace << "/"
<< Debug::nospace << _state->meanThreshold << Debug::nospace << ".";
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
out << "Delta image:" << Debug::newline;
DebugTools::Implementation::printDeltaImage(out, _state->delta, _state->expectedImage->size(), _state->max, _state->maxThreshold, _state->meanThreshold);

4
src/Magnum/GL/AbstractFramebuffer.cpp

@ -154,7 +154,7 @@ void AbstractFramebuffer::bindImplementationDefault(FramebufferTarget target) {
} else if(target == FramebufferTarget::Draw) {
if(state.drawBinding == _id) return;
state.drawBinding = _id;
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
/* Binding the framebuffer finally creates it */
_flags |= ObjectFlag::Created;
@ -492,7 +492,7 @@ void AbstractFramebuffer::invalidateImplementationDefault(const GLsizei count, c
#else
static_cast<void>(count);
static_cast<void>(attachments);
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}

2
src/Magnum/GL/AbstractObject.cpp

@ -102,7 +102,7 @@ namespace {
return khrIdentifier;
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}

8
src/Magnum/GL/AbstractTexture.cpp

@ -876,7 +876,7 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
#pragma GCC diagnostic pop
#endif
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
PixelType pixelTypeForInternalFormat(const TextureFormat internalFormat) {
@ -1175,7 +1175,7 @@ PixelType pixelTypeForInternalFormat(const TextureFormat internalFormat) {
#pragma GCC diagnostic pop
#endif
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
@ -1363,7 +1363,7 @@ void AbstractTexture::storageImplementationFallback(const GLsizei levels, const
#endif
/* No other targets are available */
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -1424,7 +1424,7 @@ void AbstractTexture::storageImplementationFallback(GLsizei levels, TextureForma
#endif
/* No other targets are available */
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif

16
src/Magnum/GL/Attribute.cpp

@ -127,7 +127,7 @@ UnsignedInt FloatAttribute::size(GLint components, DataType dataType) {
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#ifndef MAGNUM_TARGET_GLES2
@ -144,7 +144,7 @@ UnsignedInt IntAttribute::size(GLint components, DataType dataType) {
return 4*components;
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -155,7 +155,7 @@ UnsignedInt DoubleAttribute::size(GLint components, DataType dataType) {
return 8*components;
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -183,7 +183,7 @@ UnsignedInt Attribute<Math::Vector<3, Float>>::size(GLint components, DataType d
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
UnsignedInt Attribute<Math::Vector<4, Float>>::size(GLint components, DataType dataType) {
@ -218,7 +218,7 @@ UnsignedInt Attribute<Math::Vector<4, Float>>::size(GLint components, DataType d
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Debug& operator<<(Debug& debug, const SizedAttribute<1, 1>::Components value) {
@ -503,7 +503,7 @@ bool hasVertexFormat(const VertexFormat format) {
/* Nothing else expected to be returned from
vertexFormatComponentFormat() */
default: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
default: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
@ -547,7 +547,7 @@ UnsignedInt attributeSize(DynamicAttribute::Components components, DynamicAttrib
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
@ -582,7 +582,7 @@ DynamicAttribute::DynamicAttribute(const Kind kind, UnsignedInt location, const
/* Nothing else expected to be returned from
vertexFormatComponentFormat(), the unavailable formats were caught
by the hasVertexFormat() above already */
default: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
default: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
/* If the type is normalized, switch the type to GenericNormalized (if not

2
src/Magnum/GL/Context.cpp

@ -490,7 +490,7 @@ Containers::ArrayView<const Extension> Extension::extensions(Version version) {
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#if !defined(MAGNUM_BUILD_STATIC) || defined(CORRADE_TARGET_WINDOWS)

2
src/Magnum/GL/Implementation/BufferState.cpp

@ -74,7 +74,7 @@ std::size_t BufferState::indexForTarget(Buffer::TargetHint target) {
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
BufferState::BufferState(Context& context, std::vector<std::string>& extensions): bindings()

2
src/Magnum/GL/Mesh.cpp

@ -354,7 +354,7 @@ UnsignedInt Mesh::indexTypeSize() const {
case MeshIndexType::UnsignedInt: return 4;
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Mesh& Mesh::addVertexBufferInstanced(Buffer& buffer, const UnsignedInt divisor, const GLintptr offset, const GLsizei stride, const DynamicAttribute& attribute) {

2
src/Magnum/GL/PixelFormat.cpp

@ -258,7 +258,7 @@ UnsignedInt pixelSize(const PixelFormat format, const PixelType type) {
#pragma GCC diagnostic pop
#endif
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#ifndef DOXYGEN_GENERATING_OUTPUT

4
src/Magnum/GL/Shader.cpp

@ -67,7 +67,7 @@ std::string shaderName(const Shader::Type type) {
case Shader::Type::Fragment: return "fragment";
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
UnsignedInt typeToIndex(const Shader::Type type) {
@ -82,7 +82,7 @@ UnsignedInt typeToIndex(const Shader::Type type) {
#endif
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#ifndef MAGNUM_TARGET_GLES

48
src/Magnum/GL/Test/MeshGLTest.cpp

@ -694,7 +694,7 @@ void MeshGLTest::addVertexBufferUnsignedInt() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::UnsignedInt});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -727,7 +727,7 @@ void MeshGLTest::addVertexBufferInt() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Int});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -765,7 +765,7 @@ void MeshGLTest::addVertexBufferFloat() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Float});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -806,7 +806,7 @@ void MeshGLTest::addVertexBufferDouble() {
DynamicAttribute::Kind::Long, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Double});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -841,7 +841,7 @@ void MeshGLTest::addVertexBufferVectorNui() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::Three,
DynamicAttribute::DataType::UnsignedInt});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -874,7 +874,7 @@ void MeshGLTest::addVertexBufferVectorNi() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::Two,
DynamicAttribute::DataType::Int});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -912,7 +912,7 @@ void MeshGLTest::addVertexBufferVectorN() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Three,
DynamicAttribute::DataType::Float});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -956,7 +956,7 @@ void MeshGLTest::addVertexBufferVectorNd() {
DynamicAttribute::Kind::Long, 0,
DynamicAttribute::Components::Four,
DynamicAttribute::DataType::Double});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -998,7 +998,7 @@ void MeshGLTest::addVertexBufferMatrixNxN() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Three, 3,
DynamicAttribute::DataType::Float});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1044,7 +1044,7 @@ void MeshGLTest::addVertexBufferMatrixNxNd() {
DynamicAttribute::Kind::Long, 0,
DynamicAttribute::Components::Three, 3,
DynamicAttribute::DataType::Double});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1090,7 +1090,7 @@ void MeshGLTest::addVertexBufferMatrixMxN() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Four, 3,
DynamicAttribute::DataType::Float});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1128,7 +1128,7 @@ void MeshGLTest::addVertexBufferMatrixMxNd() {
DynamicAttribute::Kind::Long, 0,
DynamicAttribute::Components::Four, 3,
DynamicAttribute::DataType::Double});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1175,7 +1175,7 @@ void MeshGLTest::addVertexBufferUnsignedIntWithUnsignedShort() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::UnsignedShort});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1213,7 +1213,7 @@ void MeshGLTest::addVertexBufferUnsignedIntWithShort() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Short});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1251,7 +1251,7 @@ void MeshGLTest::addVertexBufferIntWithUnsignedShort() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::UnsignedShort});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1289,7 +1289,7 @@ void MeshGLTest::addVertexBufferIntWithShort() {
DynamicAttribute::Kind::Integral, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Short});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1332,7 +1332,7 @@ void MeshGLTest::addVertexBufferFloatWithHalf() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Half});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1363,7 +1363,7 @@ void MeshGLTest::addVertexBufferFloatWithDouble() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::One,
DynamicAttribute::DataType::Double});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1395,7 +1395,7 @@ void MeshGLTest::addVertexBufferVector3WithUnsignedInt10f11f11fRev() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Three,
DynamicAttribute::DataType::UnsignedInt10f11f11fRev});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
/* Won't test the actual values */
@ -1424,7 +1424,7 @@ void MeshGLTest::addVertexBufferVector4WithUnsignedInt2101010Rev() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Four,
DynamicAttribute::DataType::UnsignedInt2101010Rev});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
/* Won't test the actual values */
@ -1451,7 +1451,7 @@ void MeshGLTest::addVertexBufferVector4WithInt2101010Rev() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Four,
DynamicAttribute::DataType::Int2101010Rev});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
/* Won't test the actual values */
@ -1485,7 +1485,7 @@ void MeshGLTest::addVertexBufferLessVectorComponents() {
DynamicAttribute::Kind::Generic, 0,
DynamicAttribute::Components::Three,
DynamicAttribute::DataType::Float});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1532,7 +1532,7 @@ void MeshGLTest::addVertexBufferNormalized() {
DynamicAttribute::Kind::GenericNormalized, 0,
DynamicAttribute::Components::Three,
DynamicAttribute::DataType::UnsignedByte});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();
@ -1574,7 +1574,7 @@ void MeshGLTest::addVertexBufferBGRA() {
DynamicAttribute::Kind::GenericNormalized, 0,
DynamicAttribute::Components::BGRA,
DynamicAttribute::DataType::UnsignedByte});
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE();
MAGNUM_VERIFY_NO_GL_ERROR();

2
src/Magnum/Math/Color.h

@ -66,7 +66,7 @@ template<class T> typename std::enable_if<IsFloatingPoint<T>::value, Color3<T>>:
case 3: return {p, q, hsv.value};
case 4: return {t, p, hsv.value};
case 5: return {hsv.value, p, q};
default: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
default: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
template<class T> inline typename std::enable_if<IsIntegral<T>::value, Color3<T>>::type fromHsv(const ColorHsv<typename TypeTraits<T>::FloatingPointType>& hsv) {

2
src/Magnum/Mesh.cpp

@ -39,7 +39,7 @@ UnsignedInt meshIndexTypeSize(MeshIndexType type) {
case MeshIndexType::UnsignedInt: return 4;
}
CORRADE_ASSERT(false, "meshIndexTypeSize(): invalid type" << type, {});
CORRADE_ASSERT_UNREACHABLE("meshIndexTypeSize(): invalid type" << type, {});
}
#ifndef DOXYGEN_GENERATING_OUTPUT

2
src/Magnum/MeshTools/GenerateNormals.cpp

@ -203,7 +203,7 @@ template<class T> inline void generateSmoothNormalsIntoImplementation(const Cont
if(v == v0i) angle = crossAngle.second[0];
else if(v == v1i) angle = crossAngle.second[1];
else if(v == v2i) angle = crossAngle.second[2];
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
/* The normal is cross.normalized(), we need to multiply it it by
surface area which is cross.length()/2. Since normalization is

2
src/Magnum/Platform/Sdl2Application.cpp

@ -868,7 +868,7 @@ bool Sdl2Application::mainLoopIteration() {
/* If anybody sees this assert, then emscripten finally
implemented resize events. Praise them for that.
https://github.com/kripken/emscripten/issues/1731 */
CORRADE_ASSERT_UNREACHABLE();
CORRADE_INTERNAL_ASSERT_UNREACHABLE();
#else
/* {event.window.data1, event.window.data2} seems to be
framebuffer size and not window size on macOS, which

2
src/Magnum/Trade/AbstractImporter.cpp

@ -172,7 +172,7 @@ bool AbstractImporter::openFile(const std::string& filename) {
_fileCallback(filename, InputFileCallbackPolicy::Close, _fileCallbackUserData);
/* Shouldn't get here, the assert is fired already in setFileCallback() */
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
return isOpened();
}

2
src/Magnum/Trade/AnimationData.cpp

@ -198,7 +198,7 @@ Debug& operator<<(Debug& debug, const AnimationTrackTargetType value) {
/* LCOV_EXCL_STOP */
/* To silence compiler warning about unhandled values */
case AnimationTrackTargetType::Custom: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
case AnimationTrackTargetType::Custom: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
return debug << "Trade::AnimationTrackTargetType(" << Debug::nospace << reinterpret_cast<void*>(UnsignedByte(value)) << Debug::nospace << ")";

18
src/Magnum/Trade/MeshData.cpp

@ -305,7 +305,7 @@ UnsignedInt MeshData::attributeFor(const MeshAttribute name, UnsignedInt id) con
}
#ifdef CORRADE_NO_ASSERT
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#else
return ~UnsignedInt{};
#endif
@ -411,7 +411,7 @@ void MeshData::indicesInto(const Containers::StridedArrayView1D<UnsignedInt> des
return Math::castInto(Containers::arrayCast<2, const UnsignedShort>(Containers::arrayView(reinterpret_cast<const UnsignedShort*>(_indices), _indexCount)), destination1ui);
else if(_indexType == MeshIndexType::UnsignedByte)
return Math::castInto(Containers::arrayCast<2, const UnsignedByte>(Containers::arrayView(reinterpret_cast<const UnsignedByte*>(_indices), _indexCount)), destination1ui);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Containers::Array<UnsignedInt> MeshData::indicesAsArray() const {
@ -464,7 +464,7 @@ void MeshData::positions2DInto(const Containers::StridedArrayView1D<Vector2> des
else if(attribute._format == VertexFormat::Vector2sNormalized ||
attribute._format == VertexFormat::Vector3sNormalized)
Math::unpackInto(Containers::arrayCast<2, const Short>(attributeData, 2), destination2f);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Containers::Array<Vector2> MeshData::positions2DAsArray(const UnsignedInt id) const {
@ -528,7 +528,7 @@ void MeshData::positions3DInto(const Containers::StridedArrayView1D<Vector3> des
Math::unpackInto(Containers::arrayCast<2, const UnsignedShort>(attributeData, 3), destination3f);
else if(attribute._format == VertexFormat::Vector3sNormalized)
Math::unpackInto(Containers::arrayCast<2, const Short>(attributeData, 3), destination3f);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
/* For 2D positions finally fill the Z with a single value */
if(attribute._format == VertexFormat::Vector2 ||
@ -567,7 +567,7 @@ void tangentsOrNormalsInto(const Containers::StridedArrayView1D<const void> attr
Math::unpackInto(Containers::arrayCast<2, const Byte>(attributeData, 3), destination3f);
else if(format == VertexFormat::Vector3sNormalized)
Math::unpackInto(Containers::arrayCast<2, const Short>(attributeData, 3), destination3f);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
@ -690,7 +690,7 @@ void MeshData::textureCoordinates2DInto(const Containers::StridedArrayView1D<Vec
Math::unpackInto(Containers::arrayCast<2, const UnsignedShort>(attributeData, 2), destination2f);
else if(attribute._format == VertexFormat::Vector2sNormalized)
Math::unpackInto(Containers::arrayCast<2, const Short>(attributeData, 2), destination2f);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Containers::Array<Vector2> MeshData::textureCoordinates2DAsArray(const UnsignedInt id) const {
@ -732,7 +732,7 @@ void MeshData::colorsInto(const Containers::StridedArrayView1D<Color4> destinati
Math::unpackInto(Containers::arrayCast<2, const UnsignedByte>(attributeData, 4), destination4f);
else if(attribute._format == VertexFormat::Vector4usNormalized)
Math::unpackInto(Containers::arrayCast<2, const UnsignedShort>(attributeData, 4), destination4f);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
/* For three-component colors finally fill the alpha with a single value */
if(attribute._format == VertexFormat::Vector3 ||
@ -768,7 +768,7 @@ void MeshData::objectIdsInto(const Containers::StridedArrayView1D<UnsignedInt> d
Math::castInto(Containers::arrayCast<2, const UnsignedShort>(attributeData, 1), destination1ui);
else if(attribute._format == VertexFormat::UnsignedByte)
Math::castInto(Containers::arrayCast<2, const UnsignedByte>(attributeData, 1), destination1ui);
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Containers::Array<UnsignedInt> MeshData::objectIdsAsArray(const UnsignedInt id) const {
@ -815,7 +815,7 @@ Debug& operator<<(Debug& debug, const MeshAttribute value) {
/* LCOV_EXCL_STOP */
/* To silence compiler warning about unhandled values */
case MeshAttribute::Custom: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
case MeshAttribute::Custom: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
return debug << "(" << Debug::nospace << reinterpret_cast<void*>(UnsignedShort(value)) << Debug::nospace << ")";

2
src/Magnum/VertexFormat.cpp

@ -850,7 +850,7 @@ VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt component
else CORRADE_ASSERT(false,
"vertexFormat(): invalid component count" << componentCount, {});
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
VertexFormat vertexFormat(const VertexFormat format, const UnsignedInt vectorCount, UnsignedInt componentCount, const bool aligned) {

2
src/MagnumPlugins/MagnumFontConverter/Test/MagnumFontConverterTest.cpp

@ -110,7 +110,7 @@ void MagnumFontConverterTest::exportFont() {
case 2: return {23, 0};
}
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
bool _opened;

2
src/MagnumPlugins/ObjImporter/ObjImporter.cpp

@ -351,7 +351,7 @@ Containers::Optional<MeshData> ObjImporter::doMesh(UnsignedInt id, UnsignedInt)
primitive = MeshPrimitive::Triangles;
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
for(const std::string& indexTuple: indexTuples) {
std::vector<std::string> indexStrings = Utility::String::split(indexTuple, '/');

Loading…
Cancel
Save