diff options
author | gahr <gahr@FreeBSD.org> | 2013-02-22 17:06:16 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-02-22 17:06:16 +0800 |
commit | 48b1468f69297bf6bf83949c0a8bdc85a55c481e (patch) | |
tree | ec8bc4a30ffe9eff7c69c7cf1ecb5bd42a74fc40 /math | |
parent | 8a0bb69c4687e1027f3c79208350c71f31e87b26 (diff) | |
download | freebsd-ports-gnome-48b1468f69297bf6bf83949c0a8bdc85a55c481e.tar.gz freebsd-ports-gnome-48b1468f69297bf6bf83949c0a8bdc85a55c481e.tar.zst freebsd-ports-gnome-48b1468f69297bf6bf83949c0a8bdc85a55c481e.zip |
- Chase some compiler warnings / errors, especially with clang
Diffstat (limited to 'math')
-rw-r--r-- | math/carve/files/patch-common_read_ply.cpp | 11 | ||||
-rw-r--r-- | math/carve/files/patch-include-carve_kd_node.hpp | 20 | ||||
-rw-r--r-- | math/carve/files/patch-include-carve_polyhedron_impl.hpp | 42 |
3 files changed, 73 insertions, 0 deletions
diff --git a/math/carve/files/patch-common_read_ply.cpp b/math/carve/files/patch-common_read_ply.cpp new file mode 100644 index 000000000000..81c291a6e1de --- /dev/null +++ b/math/carve/files/patch-common_read_ply.cpp @@ -0,0 +1,11 @@ +--- common/read_ply.cpp.orig 2013-02-22 09:51:55.000000000 +0100 ++++ common/read_ply.cpp 2013-02-22 09:52:16.000000000 +0100 +@@ -255,7 +255,7 @@ + carve::poly::Polyhedron *readFile(std::istream &in, const carve::math::Matrix &transform) { + carve::input::Input inputs; + if (!readFile<filetype_t>(in, inputs, transform)) { +- return false; ++ return NULL; + } + for (std::list<carve::input::Data *>::const_iterator i = inputs.input.begin(); i != inputs.input.end(); ++i) { + carve::poly::Polyhedron *poly = inputs.create<carve::poly::Polyhedron>(*i); diff --git a/math/carve/files/patch-include-carve_kd_node.hpp b/math/carve/files/patch-include-carve_kd_node.hpp new file mode 100644 index 000000000000..4641ceab8410 --- /dev/null +++ b/math/carve/files/patch-include-carve_kd_node.hpp @@ -0,0 +1,20 @@ +--- include/carve/kd_node.hpp.orig 2013-02-22 09:47:07.000000000 +0100 ++++ include/carve/kd_node.hpp 2013-02-22 09:50:00.000000000 +0100 +@@ -238,7 +238,7 @@ + // q_t - the priority queue value type. + // q_t.first: distance from object to query point. + // q_t.second: pointer to object +- typedef std::pair<double, const typename kd_node::data_t *> q_t; ++ typedef std::pair<double, const data_t *> q_t; + + // the queue priority should sort from smallest distance to largest, and on equal distance, by object pointer. + struct pcmp { +@@ -266,7 +266,7 @@ + } + } + +- const typename kd_node::data_t *next() { ++ const data_t *next() { + while (1) { + if (pq.size()) { + q_t t = pq.top(); diff --git a/math/carve/files/patch-include-carve_polyhedron_impl.hpp b/math/carve/files/patch-include-carve_polyhedron_impl.hpp new file mode 100644 index 000000000000..ecede7fdc8a2 --- /dev/null +++ b/math/carve/files/patch-include-carve_polyhedron_impl.hpp @@ -0,0 +1,42 @@ +--- include/carve/polyhedron_impl.hpp.orig 2013-02-22 09:41:13.000000000 +0100 ++++ include/carve/polyhedron_impl.hpp 2013-02-22 09:46:30.000000000 +0100 +@@ -88,9 +88,9 @@ + *(*result)++ = f; + + int r = 1; +- for (size_t i = 0; i < f->edges.size(); ++i) { +- const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edges[i])]; +- const face_t *f2 = connectedFace(f, f->edges[i]); ++ for (size_t i = 0; i < f->nEdges(); ++i) { ++ const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edge(i))]; ++ const face_t *f2 = connectedFace(f, f->edge(i)); + if (f2) { + r += _faceNeighbourhood(f2, depth - 1, (*result)); + } +@@ -116,7 +116,7 @@ + int r = 0; + const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(e)]; + for (size_t i = 0; i < edge_faces.size(); ++i) { +- face_t *f = edge_faces[i]; ++ const face_t *f = edge_faces[i]; + if (f && f->manifold_id == m_id) { r += _faceNeighbourhood(f, depth, &result); } + } + return r; +@@ -131,7 +131,7 @@ + int r = 0; + const std::vector<const face_t *> &vertex_faces = connectivity.vertex_to_face[vertexToIndex_fast(v)]; + for (size_t i = 0; i < vertex_faces.size(); ++i) { +- face_t *f = vertex_faces[i]; ++ const face_t *f = vertex_faces[i]; + if (f && f->manifold_id == m_id) { r += _faceNeighbourhood(f, depth, &result); } + } + return r; +@@ -142,7 +142,7 @@ + // accessing connectivity information. + template<typename T> + int Geometry<3>::vertexToEdges(const vertex_t *v, T result) const { +- std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)]; ++ const std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)]; + std::copy(e.begin(), e.end(), result); + return e.size(); + } |