From 329a9a7b40f6b7d5288b7d453004d9061620569b Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sat, 9 Feb 2013 23:02:37 -0500 Subject: [PATCH] hbr: fix a few more warnings --- opensubdiv/hbr/cornerEdit.h | 2 +- opensubdiv/hbr/face.h | 2 +- opensubdiv/hbr/vertex.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/opensubdiv/hbr/cornerEdit.h b/opensubdiv/hbr/cornerEdit.h index 207d6966..ae086c20 100644 --- a/opensubdiv/hbr/cornerEdit.h +++ b/opensubdiv/hbr/cornerEdit.h @@ -94,7 +94,7 @@ public: if (HbrHierarchicalEdit::GetNSubfaces() == face->GetDepth()) { // Modify vertex sharpness. Note that we could actually do // this in ApplyEditToVertex as well! - float sharp; + float sharp = 0.0f; if (op == HbrHierarchicalEdit::Set) { sharp = sharpness; } else if (op == HbrHierarchicalEdit::Add) { diff --git a/opensubdiv/hbr/face.h b/opensubdiv/hbr/face.h index a5939324..3c9f4503 100644 --- a/opensubdiv/hbr/face.h +++ b/opensubdiv/hbr/face.h @@ -489,7 +489,7 @@ HbrFace::Initialize(HbrMesh* m, HbrFace* _parent, int childindex, int f stitchEdges = 0; #endif editOffset = -1; - depth = _depth; + depth = static_cast(_depth); hole = 0; coarse = 0; protect = 0; diff --git a/opensubdiv/hbr/vertex.h b/opensubdiv/hbr/vertex.h index d2e64945..f953d311 100644 --- a/opensubdiv/hbr/vertex.h +++ b/opensubdiv/hbr/vertex.h @@ -547,7 +547,8 @@ HbrVertex::AddIncidentEdge(HbrHalfedge* edge) { // will always be a boundary edge if possible. If any of the // incident edges are no longer boundaries at this point then they // can be immediately removed. - int i, newEdgeCount = 0; + int i; + unsigned short newEdgeCount = 0; bool edgeFound = false; HbrHalfedge** incidentEdges = (nIncidentEdges > 1) ? incident.edges : &incident.edge;