diff --git a/code/ACLoader.cpp b/code/ACLoader.cpp index 637f51a77..5b7b6a61d 100644 --- a/code/ACLoader.cpp +++ b/code/ACLoader.cpp @@ -620,7 +620,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object, face.mIndices[i] = cur++; // copy vertex positions - if ((vertices - mesh->mVertices) >= mesh->mNumVertices) { + if (static_cast(vertices - mesh->mVertices) >= mesh->mNumVertices) { throw DeadlyImportError("AC3D: Invalid number of vertices"); } *vertices = object.vertices[entry.first] + object.translation; diff --git a/contrib/openddlparser/code/OpenDDLParser.cpp b/contrib/openddlparser/code/OpenDDLParser.cpp index bc85ec4ab..77a1c4a25 100644 --- a/contrib/openddlparser/code/OpenDDLParser.cpp +++ b/contrib/openddlparser/code/OpenDDLParser.cpp @@ -39,14 +39,14 @@ BEGIN_ODDLPARSER_NS static const char *Version = "0.1.0"; namespace Grammar { - static const char *OpenBracketToken = "{"; - static const char *CloseBracketToken = "}"; - static const char *OpenPropertyToken = "("; - static const char *ClosePropertyToken = ")"; - static const char *BoolTrue = "true"; - static const char *BoolFalse = "false"; - static const char *RefToken = "ref"; - static const char *CommaSeparator = ","; + static const char * const OpenBracketToken = "{"; + static const char * const CloseBracketToken = "}"; + static const char * const OpenPropertyToken = "("; + static const char * const ClosePropertyToken = ")"; + static const char * const BoolTrue = "true"; + static const char * const BoolFalse = "false"; + static const char * const RefToken = "ref"; + static const char * const CommaSeparator = ","; static const char* PrimitiveTypeToken[ Value::ddl_types_max ] = { "bool", diff --git a/contrib/poly2tri/poly2tri/sweep/sweep.cc b/contrib/poly2tri/poly2tri/sweep/sweep.cc index 130e06ed4..0f398ad2d 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep.cc +++ b/contrib/poly2tri/poly2tri/sweep/sweep.cc @@ -652,13 +652,6 @@ void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Triangle& ot = t->NeighborAcross(p); Point& op = *ot.OppositePoint(*t, p); - if (&ot == NULL) { - // If we want to integrate the fillEdgeEvent do it here - // With current implementation we should never get here - //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle"); - assert(0); - } - if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) { // Lets rotate shared edge one vertex CW RotateTrianglePair(*t, p, ot, op); @@ -728,13 +721,6 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& Triangle& ot = t.NeighborAcross(p); Point& op = *ot.OppositePoint(t, p); - if (&t.NeighborAcross(p) == NULL) { - // If we want to integrate the fillEdgeEvent do it here - // With current implementation we should never get here - //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle"); - assert(0); - } - if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) { // flip with new edge op->eq FlipEdgeEvent(tcx, eq, op, &ot, op); diff --git a/contrib/poly2tri/poly2tri/sweep/sweep_context.cc b/contrib/poly2tri/poly2tri/sweep/sweep_context.cc index c9dd5a8c4..235e1eb05 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep_context.cc +++ b/contrib/poly2tri/poly2tri/sweep/sweep_context.cc @@ -164,7 +164,7 @@ void SweepContext::RemoveFromMap(Triangle* triangle) void SweepContext::MeshClean(Triangle& triangle) { - if (&triangle != NULL && !triangle.IsInterior()) { + if (!triangle.IsInterior()) { triangle.IsInterior(true); triangles_.push_back(&triangle); for (int i = 0; i < 3; i++) {