From f7e2953ad904fa0e67cc33132c712fea9c7f3329 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Fri, 15 Aug 2014 15:19:10 +0000 Subject: [PATCH] remove some warnings --- libsrc/csg/revolution.cpp | 2 +- libsrc/meshing/bisect.cpp | 4 ++-- libsrc/meshing/meshing3.cpp | 5 +++-- libsrc/meshing/meshtype.hpp | 2 +- libsrc/meshing/smoothing2.5.cpp | 3 ++- libsrc/stlgeom/meshstlsurface.cpp | 7 ++----- libsrc/stlgeom/stlgeom.cpp | 2 +- libsrc/stlgeom/stlgeomchart.cpp | 1 - 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/libsrc/csg/revolution.cpp b/libsrc/csg/revolution.cpp index 89863b6d..1b48676e 100644 --- a/libsrc/csg/revolution.cpp +++ b/libsrc/csg/revolution.cpp @@ -801,7 +801,7 @@ namespace netgen const LineSeg<2> * linesegment = dynamic_cast *>(&faces[intersecting_faces[0]]->GetSpline()); - Vec<2> t1,t2; + Vec<2> t1(0),t2(0); if(linesegment) t1 = linesegment->StartPI() - linesegment->EndPI(); diff --git a/libsrc/meshing/bisect.cpp b/libsrc/meshing/bisect.cpp index 3da30ba6..da8270a5 100644 --- a/libsrc/meshing/bisect.cpp +++ b/libsrc/meshing/bisect.cpp @@ -3871,7 +3871,7 @@ namespace netgen const bool uselocalworsening = false; - bool repaired = false; + // bool repaired = false; Validate(mesh,bad_elts,pure_badness,max_worsening,uselocalworsening); @@ -3906,7 +3906,7 @@ namespace netgen pure_badness, max_worsening,uselocalworsening, idmaps); - repaired = true; + // repaired = true; repaired_once = true; } catch(NgException & ex) diff --git a/libsrc/meshing/meshing3.cpp b/libsrc/meshing/meshing3.cpp index 58562d2b..eb756460 100644 --- a/libsrc/meshing/meshing3.cpp +++ b/libsrc/meshing/meshing3.cpp @@ -74,13 +74,14 @@ Meshing3 :: ~Meshing3 () +/* + // was war das ???? static double CalcLocH (const Array & locpoints, const Array & locfaces, double h) { return h; - // was war das ???? int i, j; double hi, h1, d, dn, sum, weight, wi; @@ -138,7 +139,7 @@ static double CalcLocH (const Array & locpoints, return sum/weight; } - +*/ PointIndex Meshing3 :: AddPoint (const Point3d & p, PointIndex globind) { diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 2e1ee4fd..04485eb4 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -669,7 +669,7 @@ namespace netgen /// Calculates Volume of elemenet double Volume (const T_POINTS & points) const; /// - virtual void Print (ostream & ost) const; + void Print (ostream & ost) const; /// int GetNFaces () const { diff --git a/libsrc/meshing/smoothing2.5.cpp b/libsrc/meshing/smoothing2.5.cpp index 2ab5c24c..b09b4e30 100644 --- a/libsrc/meshing/smoothing2.5.cpp +++ b/libsrc/meshing/smoothing2.5.cpp @@ -54,6 +54,7 @@ namespace netgen Array seia; mesh.GetSurfaceElementsOfFace (faceindex, seia); + /* bool mixed = 0; for (i = 0; i < seia.Size(); i++) if (mesh[seia[i]].GetNP() != 3) @@ -61,7 +62,7 @@ namespace netgen mixed = 1; break; } - + */ int loci; double fact; diff --git a/libsrc/stlgeom/meshstlsurface.cpp b/libsrc/stlgeom/meshstlsurface.cpp index 96c5bd18..53cd79e7 100644 --- a/libsrc/stlgeom/meshstlsurface.cpp +++ b/libsrc/stlgeom/meshstlsurface.cpp @@ -575,7 +575,7 @@ void STLSurfaceMeshing1 (STLGeometry & geom, double starttime = GetTime (); mesh.SurfaceArea().ReCalc(); - int oldnp = mesh.GetNP(); + // int oldnp = mesh.GetNP(); Array compress(mesh.GetNP()); compress = 0; @@ -919,13 +919,10 @@ int MeshingSTLSurface :: IsLineVertexOnChart (const Point3d & p1, const Point3d & p2, int endpoint, const PointGeomInfo & gi) { - Vec3d baselinenormal = geom.meshtrignv; - int lineendtrig = gi.trignum; - - return geom.TrigIsInOC (lineendtrig, geom.meshchart); + // Vec3d baselinenormal = geom.meshtrignv; // Vec3d linenormal = geom.GetTriangleNormal (lineendtrig); // return ( (baselinenormal * linenormal) > cos (30 * (M_PI/180)) ); } diff --git a/libsrc/stlgeom/stlgeom.cpp b/libsrc/stlgeom/stlgeom.cpp index 795a2713..659560db 100644 --- a/libsrc/stlgeom/stlgeom.cpp +++ b/libsrc/stlgeom/stlgeom.cpp @@ -2678,7 +2678,7 @@ void STLGeometry :: AddFaceEdges() { const STLChart& c = GetChart(chartindex.Get(i)); // bool foundone = false; - int longest_ap1, longest_ap2 = -1; + int longest_ap1 = -1, longest_ap2 = -1; double maxlen = -1; for (int j = 1; j <= c.GetNChartT(); j++) { diff --git a/libsrc/stlgeom/stlgeomchart.cpp b/libsrc/stlgeom/stlgeomchart.cpp index ca061ba4..7b133415 100644 --- a/libsrc/stlgeom/stlgeomchart.cpp +++ b/libsrc/stlgeom/stlgeomchart.cpp @@ -23,7 +23,6 @@ void STLGeometry :: MakeAtlas(Mesh & mesh) int timer2 = NgProfiler::CreateTimer ("makeatlas - part 2"); int timer3 = NgProfiler::CreateTimer ("makeatlas - part 3"); int timer4 = NgProfiler::CreateTimer ("makeatlas - part 4"); - int timer4a = NgProfiler::CreateTimer ("makeatlas - part 4a"); int timer5 = NgProfiler::CreateTimer ("makeatlas - part 5"); PushStatusF("Make Atlas");