diff --git a/src/manifold/src/boolean_result.cpp b/src/manifold/src/boolean_result.cpp index 0578c2e40..931943165 100644 --- a/src/manifold/src/boolean_result.cpp +++ b/src/manifold/src/boolean_result.cpp @@ -285,7 +285,6 @@ void AppendPartialEdges(Manifold::Impl &outR, Vec &wholeHalfedgeP, } int inclusion = i03[vStart]; - bool reversed = inclusion < 0; EdgePos edgePos = {vP2R[vStart], glm::dot(outR.vertPos_[vP2R[vStart]], edgeVec), inclusion > 0}; @@ -295,7 +294,6 @@ void AppendPartialEdges(Manifold::Impl &outR, Vec &wholeHalfedgeP, } inclusion = i03[vEnd]; - reversed |= inclusion < 0; edgePos = {vP2R[vEnd], glm::dot(outR.vertPos_[vP2R[vEnd]], edgeVec), inclusion < 0}; for (int j = 0; j < glm::abs(inclusion); ++j) { @@ -403,7 +401,6 @@ struct DuplicateHalfedges { if (!thrust::get<0>(in)) return; Halfedge halfedge = thrust::get<1>(in); if (!halfedge.IsForward()) return; - const int edgeP = thrust::get<2>(in); const int inclusion = i03[halfedge.startVert]; if (inclusion == 0) return; @@ -744,7 +741,6 @@ Manifold::Impl Boolean3::Result(OpType op) const { std::tie(faceEdge, facePQ2R) = SizeOutput(outR, inP_, inQ_, i03, i30, i12, i21, p1q2_, p2q1_, invertQ); - const int numFaceR = faceEdge.size() - 1; // This gets incremented for each halfedge that's added to a face so that the // next one knows where to slot in. Vec facePtrR = faceEdge; diff --git a/src/manifold/src/manifold.cpp b/src/manifold/src/manifold.cpp index 10b3a9126..6029764d1 100644 --- a/src/manifold/src/manifold.cpp +++ b/src/manifold/src/manifold.cpp @@ -291,7 +291,7 @@ MeshGL Manifold::GetMeshGL(glm::ivec3 normalIdx) const { // Duplicate verts with different props std::vector vert2idx(impl.NumVert(), -1); std::vector> vertPropPair(impl.NumVert()); - out.vertProperties.reserve(numVert * out.numProp); + out.vertProperties.reserve(numVert * static_cast(out.numProp)); for (int run = 0; run < out.runOriginalID.size(); ++run) { for (int tri = out.runIndex[run] / 3; tri < out.runIndex[run + 1] / 3; @@ -486,7 +486,7 @@ int Manifold::NumOverlaps(const Manifold& other) const { overlaps = other.GetCsgLeafNode().GetImpl()->EdgeCollisions( *GetCsgLeafNode().GetImpl()); - return num_overlaps += overlaps.size(); + return num_overlaps + overlaps.size(); } /** diff --git a/src/polygon/src/polygon.cpp b/src/polygon/src/polygon.cpp index cbc3904f6..1c2ced15a 100644 --- a/src/polygon/src/polygon.cpp +++ b/src/polygon/src/polygon.cpp @@ -604,7 +604,7 @@ class EarClip { area += areaCompensation; const glm::vec2 size = bBox.Size(); - const double minArea = precision_ * glm::max(size.x, size.y); + const float minArea = precision_ * glm::max(size.x, size.y); if (glm::isfinite(maxX) && area < -minArea) { holes_.insert(start); @@ -622,7 +622,6 @@ class EarClip { // incorrect due to precision, we check for polygon edges both ahead and // behind to ensure all valid options are found. void CutKeyhole(const VertItr start) { - const float startX = start->pos.x; const Rect bBox = hole2BBox_[start]; const int onTop = start->pos.y >= bBox.max.y - precision_ ? 1 : start->pos.y <= bBox.min.y + precision_ ? -1 @@ -667,7 +666,6 @@ class EarClip { // and returns it. It does so by finding any reflex verts inside the triangle // containing the best connection and the initial horizontal line. VertItr FindCloserBridge(VertItr start, VertItr edge, int onTop) { - const float p2 = precision_ * precision_; VertItr best = edge->pos.x > edge->right->pos.x ? edge : edge->right; const float maxX = best->pos.x; const float above = best->pos.y > start->pos.y ? 1 : -1; diff --git a/src/sdf/src/sdf.cpp b/src/sdf/src/sdf.cpp index 8f7ac3fad..9628e0c86 100644 --- a/src/sdf/src/sdf.cpp +++ b/src/sdf/src/sdf.cpp @@ -307,7 +307,6 @@ Mesh LevelSet(std::function sdf, Box bounds, float edgeLength, Mesh out; const glm::vec3 dim = bounds.Size(); - const float maxDim = std::max(dim[0], std::max(dim[1], dim[2])); const glm::ivec3 gridSize(dim / edgeLength); const glm::vec3 spacing = dim / (glm::vec3(gridSize));