Browse Source

Exclude unreachable code from code coverage.

pull/175/merge
Vladimír Vondruš 10 years ago
parent
commit
42d9679ac0
  1. 16
      src/Magnum/AbstractFramebuffer.cpp
  2. 14
      src/Magnum/AbstractObject.cpp
  3. 10
      src/Magnum/AbstractQuery.cpp
  4. 22
      src/Magnum/AbstractShaderProgram.cpp
  5. 20
      src/Magnum/AbstractTexture.cpp
  6. 10
      src/Magnum/Attribute.cpp
  7. 8
      src/Magnum/Buffer.cpp
  8. 2
      src/Magnum/Context.cpp
  9. 18
      src/Magnum/DebugOutput.cpp
  10. 2
      src/Magnum/Framebuffer.cpp
  11. 2
      src/Magnum/Implementation/BufferState.cpp
  12. 2
      src/Magnum/Math/Color.h
  13. 26
      src/Magnum/Mesh.cpp
  14. 4
      src/Magnum/MeshView.cpp
  15. 2
      src/Magnum/PixelStorage.cpp
  16. 4
      src/Magnum/Renderbuffer.cpp
  17. 4
      src/Magnum/Renderer.cpp
  18. 4
      src/Magnum/Shader.cpp
  19. 2
      src/Magnum/TimeQuery.h
  20. 2
      src/MagnumPlugins/MagnumFontConverter/Test/MagnumFontConverterGLTest.cpp
  21. 2
      src/MagnumPlugins/ObjImporter/ObjImporter.cpp
  22. 2
      src/MagnumPlugins/TgaImageConverter/TgaImageConverter.cpp

16
src/Magnum/AbstractFramebuffer.cpp

@ -152,7 +152,7 @@ void AbstractFramebuffer::bindImplementationDefault(FramebufferTarget target) {
} else if(target == FramebufferTarget::Draw) {
if(state.drawBinding == _id) return;
state.drawBinding = _id;
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
/* Binding the framebuffer finally creates it */
_flags |= ObjectFlag::Created;
@ -240,7 +240,7 @@ void AbstractFramebuffer::blitImplementationANGLE(AbstractFramebuffer& source, A
static_cast<void>(destinationRectangle);
static_cast<void>(mask);
static_cast<void>(filter);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -256,7 +256,7 @@ void AbstractFramebuffer::blitImplementationNV(AbstractFramebuffer& source, Abst
static_cast<void>(destinationRectangle);
static_cast<void>(mask);
static_cast<void>(filter);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -442,7 +442,7 @@ void AbstractFramebuffer::invalidateImplementationDefault(const GLsizei count, c
#else
static_cast<void>(count);
static_cast<void>(attachments);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -515,7 +515,7 @@ void AbstractFramebuffer::drawBuffersImplementationEXT(GLsizei count, const GLen
#else
static_cast<void>(count);
static_cast<void>(buffers);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -528,7 +528,7 @@ void AbstractFramebuffer::drawBuffersImplementationNV(GLsizei count, const GLenu
#else
static_cast<void>(count);
static_cast<void>(buffers);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -561,7 +561,7 @@ void AbstractFramebuffer::readBufferImplementationDefault(GLenum buffer) {
glReadBufferNV(buffer);
#else
static_cast<void>(buffer);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -593,7 +593,7 @@ void AbstractFramebuffer::readImplementationRobustness(const Range2Di& rectangle
static_cast<void>(type);
static_cast<void>(dataSize);
static_cast<void>(data);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

14
src/Magnum/AbstractObject.cpp

@ -107,7 +107,7 @@ namespace {
return khrIdentifier;
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
#endif
@ -140,7 +140,7 @@ void AbstractObject::labelImplementationKhr(const GLenum identifier, const GLuin
static_cast<void>(identifier);
static_cast<void>(name);
static_cast<void>(label);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -152,7 +152,7 @@ void AbstractObject::labelImplementationExt(const GLenum identifier, const GLuin
static_cast<void>(identifier);
static_cast<void>(name);
static_cast<void>(label);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -169,7 +169,7 @@ std::string AbstractObject::getLabelImplementationKhr(const GLenum identifier, c
#else
static_cast<void>(identifier);
static_cast<void>(name);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Make place also for the null terminator */
@ -180,7 +180,7 @@ std::string AbstractObject::getLabelImplementationKhr(const GLenum identifier, c
#elif !defined(CORRADE_TARGET_NACL)
glGetObjectLabelKHR(identifier, name, size+1, nullptr, &label[0]);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Pop null terminator and return the string */
@ -198,7 +198,7 @@ std::string AbstractObject::getLabelImplementationExt(const GLenum identifier, c
#else
static_cast<void>(identifier);
static_cast<void>(name);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Make place also for the null terminator */
@ -207,7 +207,7 @@ std::string AbstractObject::getLabelImplementationExt(const GLenum identifier, c
#ifndef CORRADE_TARGET_NACL
glGetObjectLabelEXT(type, name, size+1, nullptr, &label[0]);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Pop null terminator and return the string */

10
src/Magnum/AbstractQuery.cpp

@ -55,7 +55,7 @@ AbstractQuery::~AbstractQuery() {
#elif !defined(CORRADE_TARGET_EMSCRIPTEN)
glDeleteQueriesEXT(1, &_id);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
_flags |= ObjectFlag::Created;
}
@ -66,7 +66,7 @@ void AbstractQuery::createImplementationDefault() {
#elif !defined(CORRADE_TARGET_EMSCRIPTEN)
glGenQueriesEXT(1, &_id);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -126,7 +126,7 @@ template<> Int AbstractQuery::result<Int>() {
#elif !defined(CORRADE_TARGET_NACL)
glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
return result;
}
@ -138,7 +138,7 @@ template<> UnsignedLong AbstractQuery::result<UnsignedLong>() {
#elif !defined(CORRADE_TARGET_NACL)
glGetQueryObjectui64vEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
return result;
}
@ -150,7 +150,7 @@ template<> Long AbstractQuery::result<Long>() {
#elif !defined(CORRADE_TARGET_NACL)
glGetQueryObjecti64vEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
return result;
}

22
src/Magnum/AbstractShaderProgram.cpp

@ -478,7 +478,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -506,7 +506,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -534,7 +534,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -562,7 +562,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -590,7 +590,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -618,7 +618,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -646,7 +646,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -674,7 +674,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -850,7 +850,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -878,7 +878,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -906,7 +906,7 @@ void AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT(const GLint locat
static_cast<void>(location);
static_cast<void>(count);
static_cast<void>(values);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

20
src/Magnum/AbstractTexture.cpp

@ -808,7 +808,7 @@ PixelFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
return PixelFormat::DepthStencil;
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
PixelType AbstractTexture::imageTypeForInternalFormat(const TextureFormat internalFormat) {
@ -1053,7 +1053,7 @@ PixelType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
#endif
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -1254,7 +1254,7 @@ void AbstractTexture::storageImplementationFallback(const GLsizei levels, const
#endif
/* No other targets are available */
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -1269,7 +1269,7 @@ void AbstractTexture::storageImplementationDefault(GLsizei levels, TextureFormat
static_cast<void>(levels);
static_cast<void>(internalFormat);
static_cast<void>(size);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -1313,7 +1313,7 @@ void AbstractTexture::storageImplementationFallback(GLsizei levels, TextureForma
#endif
/* No other targets are available */
else CORRADE_ASSERT_UNREACHABLE();
else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -1328,7 +1328,7 @@ void AbstractTexture::storageImplementationDefault(GLsizei levels, TextureFormat
static_cast<void>(levels);
static_cast<void>(internalFormat);
static_cast<void>(size);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -1511,7 +1511,7 @@ void AbstractTexture::subImageImplementationDefault(GLint level, const Vector3i&
static_cast<void>(format);
static_cast<void>(type);
static_cast<void>(data);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -1527,7 +1527,7 @@ void AbstractTexture::compressedSubImageImplementationDefault(const GLint level,
static_cast<void>(size);
static_cast<void>(format);
static_cast<void>(data);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -1995,7 +1995,7 @@ void AbstractTexture::DataHelper<3>::setImage(AbstractTexture& texture, const GL
static_cast<void>(level);
static_cast<void>(internalFormat);
static_cast<void>(image);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -2016,7 +2016,7 @@ void AbstractTexture::DataHelper<3>::setCompressedImage(AbstractTexture& texture
#else
static_cast<void>(level);
static_cast<void>(image);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

10
src/Magnum/Attribute.cpp

@ -49,7 +49,7 @@ UnsignedInt FloatAttribute::size(GLint components, DataType dataType) {
#endif
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#ifndef MAGNUM_TARGET_GLES2
@ -66,7 +66,7 @@ UnsignedInt IntAttribute::size(GLint components, DataType dataType) {
return 4*components;
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -77,7 +77,7 @@ UnsignedInt DoubleAttribute::size(GLint components, DataType dataType) {
return 8*components;
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
#endif
@ -103,7 +103,7 @@ UnsignedInt Attribute<Math::Vector<3, Float>>::size(GLint components, DataType d
#endif
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
UnsignedInt Attribute<Math::Vector<4, Float>>::size(GLint components, DataType dataType) {
@ -136,7 +136,7 @@ UnsignedInt Attribute<Math::Vector<4, Float>>::size(GLint components, DataType d
#endif
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Debug& operator<<(Debug& debug, SizedAttribute<1, 1>::Components value) {

8
src/Magnum/Buffer.cpp

@ -537,7 +537,7 @@ void* Buffer::mapImplementationDefault(MapAccess access) {
return glMapBufferOES(GLenum(bindSomewhereInternal(_targetHint)), GLenum(access));
#else
static_cast<void>(access);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -561,7 +561,7 @@ void* Buffer::mapRangeImplementationDefault(GLintptr offset, GLsizeiptr length,
static_cast<void>(offset);
static_cast<void>(length);
static_cast<void>(access);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -584,7 +584,7 @@ void Buffer::flushMappedRangeImplementationDefault(GLintptr offset, GLsizeiptr l
#else
static_cast<void>(offset);
static_cast<void>(length);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -605,7 +605,7 @@ bool Buffer::unmapImplementationDefault() {
#elif !defined(CORRADE_TARGET_NACL)
return glUnmapBufferOES(GLenum(bindSomewhereInternal(_targetHint)));
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}

2
src/Magnum/Context.cpp

@ -407,7 +407,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
#endif
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
namespace {

18
src/Magnum/DebugOutput.cpp

@ -184,7 +184,7 @@ void DebugOutput::controlImplementationKhr(const GLenum source, const GLenum typ
static_cast<void>(severity);
static_cast<void>(ids);
static_cast<void>(enabled);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -206,7 +206,7 @@ void DebugOutput::callbackImplementationKhr(const Callback callback, const void*
(callbackWrapper, userParam);
#else
static_cast<void>(userParam);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Deleting callback */
@ -219,7 +219,7 @@ void DebugOutput::callbackImplementationKhr(const Callback callback, const void*
#endif
(nullptr, nullptr);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
}
@ -296,7 +296,7 @@ void DebugMessage::insertImplementationKhr(const Source source, const Type type,
static_cast<void>(id);
static_cast<void>(severity);
static_cast<void>(string);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -305,7 +305,7 @@ void DebugMessage::insertImplementationExt(Source, Type, UnsignedInt, DebugOutpu
glInsertEventMarkerEXT(string.size(), string.data());
#else
static_cast<void>(string);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -396,7 +396,7 @@ void DebugGroup::pushImplementationKhr(const Source source, const UnsignedInt id
static_cast<void>(source);
static_cast<void>(id);
static_cast<void>(message);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -405,7 +405,7 @@ void DebugGroup::pushImplementationExt(Source, UnsignedInt, const Containers::Ar
glPushGroupMarkerEXT(message.size(), message.data());
#else
static_cast<void>(message);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -417,7 +417,7 @@ void DebugGroup::popImplementationKhr() {
#elif !defined(CORRADE_TARGET_NACL)
glPopDebugGroupKHR();
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -425,7 +425,7 @@ void DebugGroup::popImplementationExt() {
#ifndef CORRADE_TARGET_NACL
glPopGroupMarkerEXT();
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}

2
src/Magnum/Framebuffer.cpp

@ -389,7 +389,7 @@ void Framebuffer::textureLayerImplementationDefault(BufferAttachment attachment,
static_cast<void>(textureId);
static_cast<void>(mipLevel);
static_cast<void>(layer);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

2
src/Magnum/Implementation/BufferState.cpp

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

2
src/Magnum/Math/Color.h

@ -62,7 +62,7 @@ template<class T> typename std::enable_if<std::is_floating_point<T>::value, Colo
case 3: return {p, q, value};
case 4: return {t, p, value};
case 5: return {value, p, q};
default: CORRADE_ASSERT_UNREACHABLE();
default: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
}
template<class T> inline typename std::enable_if<std::is_integral<T>::value, Color3<T>>::type fromHSV(typename Color3<T>::HSV hsv) {

26
src/Magnum/Mesh.cpp

@ -119,7 +119,7 @@ std::size_t Mesh::indexSize(IndexType type) {
case IndexType::UnsignedInt: return 4;
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
Mesh::Mesh(const MeshPrimitive primitive): _primitive{primitive}, _flags{ObjectFlag::DeleteOnDestruction}, _count{0}, _baseVertex{0}, _instanceCount{1},
@ -373,7 +373,7 @@ void Mesh::bindVAO() {
#elif !defined(CORRADE_TARGET_NACL)
glBindVertexArrayOES(current = _id);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
}
@ -389,7 +389,7 @@ void Mesh::createImplementationVAO() {
#elif !defined(CORRADE_TARGET_NACL)
glGenVertexArraysOES(1, &_id);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding);
}
@ -409,7 +409,7 @@ void Mesh::destroyImplementationVAO() {
#elif !defined(CORRADE_TARGET_NACL)
glDeleteVertexArraysOES(1, &_id);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -505,7 +505,7 @@ void Mesh::vertexAttribDivisorImplementationANGLE(const GLuint index, const GLui
#else
static_cast<void>(index);
static_cast<void>(divisor);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#ifndef MAGNUM_TARGET_WEBGL
@ -515,7 +515,7 @@ void Mesh::vertexAttribDivisorImplementationEXT(const GLuint index, const GLuint
#else
static_cast<void>(index);
static_cast<void>(divisor);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
void Mesh::vertexAttribDivisorImplementationNV(const GLuint index, const GLuint divisor) {
@ -524,7 +524,7 @@ void Mesh::vertexAttribDivisorImplementationNV(const GLuint index, const GLuint
#else
static_cast<void>(index);
static_cast<void>(divisor);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -570,7 +570,7 @@ void Mesh::drawArraysInstancedImplementationANGLE(const GLint baseVertex, const
static_cast<void>(baseVertex);
static_cast<void>(count);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -582,7 +582,7 @@ void Mesh::drawArraysInstancedImplementationEXT(const GLint baseVertex, const GL
static_cast<void>(baseVertex);
static_cast<void>(count);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -593,7 +593,7 @@ void Mesh::drawArraysInstancedImplementationNV(const GLint baseVertex, const GLs
static_cast<void>(baseVertex);
static_cast<void>(count);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -605,7 +605,7 @@ void Mesh::drawElementsInstancedImplementationANGLE(const GLsizei count, const G
static_cast<void>(count);
static_cast<void>(indexOffset);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -617,7 +617,7 @@ void Mesh::drawElementsInstancedImplementationEXT(const GLsizei count, const GLi
static_cast<void>(count);
static_cast<void>(indexOffset);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -628,7 +628,7 @@ void Mesh::drawElementsInstancedImplementationNV(const GLsizei count, const GLin
static_cast<void>(count);
static_cast<void>(indexOffset);
static_cast<void>(instanceCount);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

4
src/Magnum/MeshView.cpp

@ -99,7 +99,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list<std::referen
#elif !defined(CORRADE_TARGET_NACL)
glMultiDrawArraysEXT(GLenum(original._primitive), baseVertex, count, meshes.size());
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
/* Indexed meshes */
@ -118,7 +118,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list<std::referen
#elif !defined(CORRADE_TARGET_NACL)
glMultiDrawElementsEXT(GLenum(original._primitive), count, GLenum(original._indexType), indices, meshes.size());
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
}

2
src/Magnum/PixelStorage.cpp

@ -153,7 +153,7 @@ std::size_t PixelStorage::pixelSize(PixelFormat format, PixelType type) {
CORRADE_ASSERT(false, "AbstractImage::pixelSize(): invalid PixelType specified for depth/stencil PixelFormat", 0);
}
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
std::tuple<Math::Vector3<std::size_t>, Math::Vector3<std::size_t>, std::size_t> PixelStorage::dataProperties(const PixelFormat format, const PixelType type, const Vector3i& size) const {

4
src/Magnum/Renderbuffer.cpp

@ -169,7 +169,7 @@ void Renderbuffer::storageMultisampleImplementationANGLE(const GLsizei samples,
static_cast<void>(samples);
static_cast<void>(internalFormat);
static_cast<void>(size);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
@ -181,7 +181,7 @@ void Renderbuffer::storageMultisampleImplementationNV(const GLsizei samples, con
static_cast<void>(samples);
static_cast<void>(internalFormat);
static_cast<void>(size);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

4
src/Magnum/Renderer.cpp

@ -94,7 +94,7 @@ void Renderer::setPolygonMode(const PolygonMode mode) {
(GL_FRONT_AND_BACK, GLenum(mode));
#else
static_cast<void>(mode);
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif
@ -233,7 +233,7 @@ Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationRobustn
#elif !defined(CORRADE_TARGET_NACL)
return GraphicsResetStatus(glGetGraphicsResetStatusEXT());
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}
#endif

4
src/Magnum/Shader.cpp

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

2
src/Magnum/TimeQuery.h

@ -152,7 +152,7 @@ class TimeQuery: public AbstractQuery {
#elif !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL)
glQueryCounterEXT(id(), GL_TIMESTAMP_EXT);
#else
CORRADE_ASSERT_UNREACHABLE();
CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
#endif
}

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

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

2
src/MagnumPlugins/ObjImporter/ObjImporter.cpp

@ -361,7 +361,7 @@ std::optional<MeshData3D> ObjImporter::doMesh3D(UnsignedInt id) {
primitive = MeshPrimitive::Triangles;
} else CORRADE_ASSERT_UNREACHABLE();
} else CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
for(const std::string& indexTuple: indexTuples) {
std::vector<std::string> indices = Utility::String::split(indexTuple, '/');

2
src/MagnumPlugins/TgaImageConverter/TgaImageConverter.cpp

@ -91,7 +91,7 @@ Containers::Array<char> TgaImageConverter::doExportToData(const ImageView2D& ima
#endif
header->imageType = 3;
break;
default: CORRADE_ASSERT_UNREACHABLE();
default: CORRADE_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */
}
header->bpp = pixelSize*8;
header->width = UnsignedShort(Utility::Endianness::littleEndian(image.size().x()));

Loading…
Cancel
Save