Merge pull request #603 from ReliaSolve/fix_compiler_warnings

Fix compiler warnings
pull/587/head
Alexander Gessler 2015-07-05 13:15:12 +02:00
commit 2fd0a84c01
4 changed files with 10 additions and 24 deletions

View File

@ -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<unsigned>(vertices - mesh->mVertices) >= mesh->mNumVertices) {
throw DeadlyImportError("AC3D: Invalid number of vertices");
}
*vertices = object.vertices[entry.first] + object.translation;

View File

@ -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",

View File

@ -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);

View File

@ -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++) {