From 7f55f30ced7bbf863747e80e4e17fa7a01d74d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 6 Aug 2012 16:28:23 +0200 Subject: [PATCH] CORRADE_ASSERT() now needs semicolon after. --- src/AbstractShaderProgram.cpp | 6 +++--- src/Camera.cpp | 2 +- src/IndexedMesh.cpp | 2 +- src/Mesh.cpp | 2 +- src/MeshTools/CombineIndexedArrays.h | 2 +- src/MeshTools/FlipNormals.cpp | 2 +- src/MeshTools/GenerateFlatNormals.cpp | 2 +- src/MeshTools/Interleave.h | 4 ++-- src/MeshTools/Subdivide.h | 2 +- src/Object.cpp | 4 ++-- src/Primitives/Capsule.cpp | 2 +- src/Primitives/UVSphere.cpp | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/AbstractShaderProgram.cpp b/src/AbstractShaderProgram.cpp index e8fd69658..4fd606973 100644 --- a/src/AbstractShaderProgram.cpp +++ b/src/AbstractShaderProgram.cpp @@ -39,14 +39,14 @@ bool AbstractShaderProgram::attachShader(Shader& shader) { } void AbstractShaderProgram::bindAttributeLocation(GLuint location, const string& name) { - CORRADE_ASSERT(state == Initialized, "AbstractShaderProgram: attribute cannot be bound after linking.", ) + CORRADE_ASSERT(state == Initialized, "AbstractShaderProgram: attribute cannot be bound after linking.", ); glBindAttribLocation(program, location, name.c_str()); } #ifndef MAGNUM_TARGET_GLES void AbstractShaderProgram::bindFragmentDataLocation(GLuint location, const std::string& name) { - CORRADE_ASSERT(state == Initialized, "AbstractShaderProgram: fragment data location cannot be bound after linking.", ) + CORRADE_ASSERT(state == Initialized, "AbstractShaderProgram: fragment data location cannot be bound after linking.", ); glBindFragDataLocation(program, location, name.c_str()); } @@ -83,7 +83,7 @@ void AbstractShaderProgram::link() { GLint AbstractShaderProgram::uniformLocation(const std::string& name) { /** @todo What if linking just failed (not programmer error?) */ - CORRADE_ASSERT(state == Linked, "AbstractShaderProgram: uniform location cannot be retrieved before linking.", -1) + CORRADE_ASSERT(state == Linked, "AbstractShaderProgram: uniform location cannot be retrieved before linking.", -1); GLint location = glGetUniformLocation(program, name.c_str()); if(location == -1) diff --git a/src/Camera.cpp b/src/Camera.cpp index 32c44787e..f15454a27 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -103,7 +103,7 @@ void Camera::fixAspectRatio() { void Camera::draw() { Scene* s = scene(); - CORRADE_ASSERT(s, "Camera: cannot draw without camera attached to scene", ) + CORRADE_ASSERT(s, "Camera: cannot draw without camera attached to scene", ); Framebuffer::clear(); diff --git a/src/IndexedMesh.cpp b/src/IndexedMesh.cpp index 76d1b5040..05a9b009a 100644 --- a/src/IndexedMesh.cpp +++ b/src/IndexedMesh.cpp @@ -41,7 +41,7 @@ void IndexedMesh::draw() { void IndexedMesh::finalize() { if(isFinalized()) return; - CORRADE_ASSERT(_indexCount, "IndexedMesh: the mesh has zero index count!", ) + CORRADE_ASSERT(_indexCount, "IndexedMesh: the mesh has zero index count!", ); /* Finalize attribute positions */ Mesh::finalize(); diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 6cd8633a5..5bfe0567c 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -78,7 +78,7 @@ void Mesh::finalize() { /* Already finalized */ if(finalized) return; - CORRADE_ASSERT(_vertexCount, "Mesh: the mesh has zero vertex count!", ) + CORRADE_ASSERT(_vertexCount, "Mesh: the mesh has zero vertex count!", ); /* Finalize attribute positions for every buffer */ for(auto& it: _buffers) { diff --git a/src/MeshTools/CombineIndexedArrays.h b/src/MeshTools/CombineIndexedArrays.h index 4ed096639..d3b272e8d 100644 --- a/src/MeshTools/CombineIndexedArrays.h +++ b/src/MeshTools/CombineIndexedArrays.h @@ -57,7 +57,7 @@ class CombineIndexedArrays { private: template inline static size_t indexCount(const std::vector& first, const std::vector&... next) { - CORRADE_ASSERT(sizeof...(next) == 0 || indexCount(next...) == first.size(), "MeshTools::combineIndexedArrays(): index arrays don't have the same length, nothing done.", 0) + CORRADE_ASSERT(sizeof...(next) == 0 || indexCount(next...) == first.size(), "MeshTools::combineIndexedArrays(): index arrays don't have the same length, nothing done.", 0); return first.size(); } diff --git a/src/MeshTools/FlipNormals.cpp b/src/MeshTools/FlipNormals.cpp index 8abc87cc2..1a38ede06 100644 --- a/src/MeshTools/FlipNormals.cpp +++ b/src/MeshTools/FlipNormals.cpp @@ -20,7 +20,7 @@ using namespace std; namespace Magnum { namespace MeshTools { void flipFaceWinding(vector& indices) { - CORRADE_ASSERT(!(indices.size()%3), "MeshTools::flipNormals(): index count is not divisible by 3!", ) + CORRADE_ASSERT(!(indices.size()%3), "MeshTools::flipNormals(): index count is not divisible by 3!", ); for(size_t i = 0; i != indices.size(); i += 3) swap(indices[i+1], indices[i+2]); diff --git a/src/MeshTools/GenerateFlatNormals.cpp b/src/MeshTools/GenerateFlatNormals.cpp index 69d9b7105..e52e4379e 100644 --- a/src/MeshTools/GenerateFlatNormals.cpp +++ b/src/MeshTools/GenerateFlatNormals.cpp @@ -22,7 +22,7 @@ using namespace std; namespace Magnum { namespace MeshTools { tuple, vector> generateFlatNormals(const std::vector< unsigned int >& indices, const vector< Vector4 >& vertices) { - CORRADE_ASSERT(!(indices.size()%3), "MeshTools::generateFlatNormals(): index count is not divisible by 3!", (tuple, vector>())) + CORRADE_ASSERT(!(indices.size()%3), "MeshTools::generateFlatNormals(): index count is not divisible by 3!", (tuple, vector>())); /* Create normal for every triangle (assuming counterclockwise winding) */ vector normalIndices; diff --git a/src/MeshTools/Interleave.h b/src/MeshTools/Interleave.h index 8376b1ae7..aa1de8558 100644 --- a/src/MeshTools/Interleave.h +++ b/src/MeshTools/Interleave.h @@ -53,7 +53,7 @@ class Interleave { } template void operator()(Mesh* mesh, Buffer* buffer, Buffer::Usage usage, const T&... attributes) { - CORRADE_ASSERT(mesh->isInterleaved(buffer), "MeshTools::interleave(): the buffer is not interleaved, nothing done", ) + CORRADE_ASSERT(mesh->isInterleaved(buffer), "MeshTools::interleave(): the buffer is not interleaved, nothing done", ); operator()(attributes...); @@ -64,7 +64,7 @@ class Interleave { } template inline static size_t attributeCount(const T& first, const U&... next) { - CORRADE_ASSERT(sizeof...(next) == 0 || attributeCount(next...) == first.size(), "MeshTools::interleave(): attribute arrays don't have the same length, nothing done.", 0) + CORRADE_ASSERT(sizeof...(next) == 0 || attributeCount(next...) == first.size(), "MeshTools::interleave(): attribute arrays don't have the same length, nothing done.", 0); return first.size(); } diff --git a/src/MeshTools/Subdivide.h b/src/MeshTools/Subdivide.h index 444c44611..7dad9a0b7 100644 --- a/src/MeshTools/Subdivide.h +++ b/src/MeshTools/Subdivide.h @@ -32,7 +32,7 @@ template class Subdivide { inline Subdivide(std::vector& indices, std::vector& vertices): indices(indices), vertices(vertices) {} void operator()(Interpolator interpolator) { - CORRADE_ASSERT(!(indices.size()%3), "MeshTools::subdivide(): index count is not divisible by 3!", ) + CORRADE_ASSERT(!(indices.size()%3), "MeshTools::subdivide(): index count is not divisible by 3!", ); size_t indexCount = indices.size(); indices.reserve(indices.size()*4); diff --git a/src/Object.cpp b/src/Object.cpp index 861b03346..66614f7ed 100644 --- a/src/Object.cpp +++ b/src/Object.cpp @@ -64,7 +64,7 @@ Matrix4 Object::absoluteTransformation(Camera* camera) { /* We got to the scene, multiply with camera matrix */ if(p->parent() == p) { if(camera) { - CORRADE_ASSERT(camera->scene() == scene(), "Object::absoluteTransformation(): the camera is not part of the same scene as object!", t) + CORRADE_ASSERT(camera->scene() == scene(), "Object::absoluteTransformation(): the camera is not part of the same scene as object!", t); t = camera->cameraMatrix()*t; } @@ -74,7 +74,7 @@ Matrix4 Object::absoluteTransformation(Camera* camera) { p = p->parent(); } - CORRADE_ASSERT(p != nullptr || camera == nullptr, "Object::absoluteTransformation(): the object is not part of camera scene!", t) + CORRADE_ASSERT(p != nullptr || camera == nullptr, "Object::absoluteTransformation(): the object is not part of camera scene!", t); return t; } diff --git a/src/Primitives/Capsule.cpp b/src/Primitives/Capsule.cpp index 00303e687..5df5b13f7 100644 --- a/src/Primitives/Capsule.cpp +++ b/src/Primitives/Capsule.cpp @@ -20,7 +20,7 @@ using namespace std; namespace Magnum { namespace Primitives { Capsule::Capsule(unsigned int rings, unsigned int segments, GLfloat length, TextureCoords textureCoords): MeshData("", Mesh::Primitive::Triangles, new vector, {new vector()}, {new vector()}, textureCoords == TextureCoords::Generate ? vector*>{new vector()} : vector*>()), segments(segments), textureCoords(textureCoords) { - CORRADE_ASSERT(rings >= 1 && segments >= 3, "Capsule must have at least one ring and three segments", ) + CORRADE_ASSERT(rings >= 1 && segments >= 3, "Capsule must have at least one ring and three segments", ); GLfloat height = 2.0f+length; GLfloat textureCoordsVIncrement = 1.0f/(rings*height); diff --git a/src/Primitives/UVSphere.cpp b/src/Primitives/UVSphere.cpp index ba798f68a..825a5ee26 100644 --- a/src/Primitives/UVSphere.cpp +++ b/src/Primitives/UVSphere.cpp @@ -20,7 +20,7 @@ using namespace std; namespace Magnum { namespace Primitives { UVSphere::UVSphere(unsigned int rings, unsigned int segments, TextureCoords textureCoords): Capsule(segments, textureCoords) { - CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", ) + CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", ); GLfloat textureCoordsVIncrement = 1.0f/rings; GLfloat ringAngleIncrement = Math::Constants::pi()/rings;