From 6190771817cb85961ae8137e5b4937f64530b7fc Mon Sep 17 00:00:00 2001 From: Stinkfist0 Date: Wed, 4 Nov 2015 18:27:46 +0200 Subject: [PATCH] Fix/suppress signed-unsigned int conversion warnings on Windows x64. --- src/ifcgeom/IfcGeomCurves.cpp | 4 ++-- src/ifcgeom/IfcGeomFaces.cpp | 10 +++++----- src/ifcgeom/IfcGeomShapes.cpp | 4 ++-- src/ifcparse/IfcUtil.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ifcgeom/IfcGeomCurves.cpp b/src/ifcgeom/IfcGeomCurves.cpp index 3d42984299..117df42f53 100644 --- a/src/ifcgeom/IfcGeomCurves.cpp +++ b/src/ifcgeom/IfcGeomCurves.cpp @@ -149,8 +149,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineCurveWithKnots* l, Hand const std::vector knots = l->Knots(); TColgp_Array1OfPnt Poles(0, cps->size() - 1); - TColStd_Array1OfReal Knots(0, knots.size() - 1); - TColStd_Array1OfInteger Mults(0, mults.size() - 1); + TColStd_Array1OfReal Knots(0, (int)knots.size() - 1); + TColStd_Array1OfInteger Mults(0, (int)mults.size() - 1); Standard_Integer Degree = l->Degree(); Standard_Boolean Periodic = l->ClosedCurve(); diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index fe0b36681f..da3f95c105 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -899,11 +899,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineSurfaceWithKnots* l, To std::vector umults = l->UMultiplicities(); std::vector vmults = l->VMultiplicities(); - TColgp_Array2OfPnt Poles (0, cps->size() - 1, 0, (*cps->begin()).size() - 1); - TColStd_Array1OfReal UKnots(0, uknots.size() - 1); - TColStd_Array1OfReal VKnots(0, vknots.size() - 1); - TColStd_Array1OfInteger UMults(0, umults.size() - 1); - TColStd_Array1OfInteger VMults(0, vmults.size() - 1); + TColgp_Array2OfPnt Poles (0, (int)cps->size() - 1, 0, (int)(*cps->begin()).size() - 1); + TColStd_Array1OfReal UKnots(0, (int)uknots.size() - 1); + TColStd_Array1OfReal VKnots(0, (int)vknots.size() - 1); + TColStd_Array1OfInteger UMults(0, (int)umults.size() - 1); + TColStd_Array1OfInteger VMults(0, (int)vmults.size() - 1); Standard_Integer UDegree = l->UDegree(); Standard_Integer VDegree = l->VDegree(); diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 896863805d..861de7de6c 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -399,7 +399,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Shape& shape) { IfcSchema::IfcFace::list::ptr faces = l->CfsFaces(); bool facesAdded = false; - const unsigned int num_faces = faces->size(); + const unsigned int num_faces = (unsigned)faces->size(); bool valid_shell = false; if ( num_faces < getValue(GV_MAX_FACES_TO_SEW) ) { BRepOffsetAPI_Sewing builder; @@ -882,7 +882,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTriangulatedFaceSet* l, TopoDS if (faces.empty()) return false; - const unsigned int num_faces = indices.size(); + const unsigned int num_faces = (unsigned)indices.size(); bool valid_shell = false; if (faces.size() < getValue(GV_MAX_FACES_TO_SEW)) { diff --git a/src/ifcparse/IfcUtil.h b/src/ifcparse/IfcUtil.h index 3e106c5afc..cbf18333e0 100644 --- a/src/ifcparse/IfcUtil.h +++ b/src/ifcparse/IfcUtil.h @@ -230,7 +230,7 @@ public: void push(const std::vector& t) {ls.push_back(t);} outer_it begin() { return ls.begin(); } outer_it end() { return ls.end(); } - int size() const { return ls.size(); } + int size() const { return (int)ls.size(); } int totalSize() const { int accum = 0; for (outer_it it = begin(); it != end(); ++it) {