From 32c26911c45ba7f36bd16ffcee7f136c719d86cb Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Tue, 28 Mar 2017 17:43:16 +0200 Subject: [PATCH] Removed harmless warnings on rarely used objects... --- vcg/space/index/aabb_binary_tree/closest.h | 1 - vcg/space/index/aabb_binary_tree/kclosest.h | 2 -- vcg/space/index/aabb_binary_tree/ray.h | 2 -- vcg/space/index/octree.h | 1 - vcg/space/index/octree_template.h | 8 +++++--- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/vcg/space/index/aabb_binary_tree/closest.h b/vcg/space/index/aabb_binary_tree/closest.h index a4f368cb..688cd065 100644 --- a/vcg/space/index/aabb_binary_tree/closest.h +++ b/vcg/space/index/aabb_binary_tree/closest.h @@ -59,7 +59,6 @@ public: template static inline ObjPtr Closest(TreeType & tree, OBJPOINTDISTANCEFUNCT & getPointDistance, const CoordType & p, const ScalarType & maxDist, ScalarType & minDist, CoordType & q) { - typedef OBJPOINTDISTANCEFUNCT ObjPointDistanceFunct; typedef std::vector NodePtrVector; typedef typename NodePtrVector::const_iterator NodePtrVector_ci; diff --git a/vcg/space/index/aabb_binary_tree/kclosest.h b/vcg/space/index/aabb_binary_tree/kclosest.h index 1d1e3dcc..ef98e6ae 100644 --- a/vcg/space/index/aabb_binary_tree/kclosest.h +++ b/vcg/space/index/aabb_binary_tree/kclosest.h @@ -76,8 +76,6 @@ protected: public: template static inline unsigned int KClosest(TreeType & tree, OBJPOINTDISTANCEFUNCT & getPointDistance, const unsigned int k, const CoordType & p, const ScalarType & maxDist, OBJPTRCONTAINERTYPE & objects, DISTCONTAINERTYPE & distances, POINTCONTAINERTYPE & points) { - typedef std::vector NodePtrVector; - typedef typename NodePtrVector::const_iterator NodePtrVector_ci; if (k == 0) { return (0); diff --git a/vcg/space/index/aabb_binary_tree/ray.h b/vcg/space/index/aabb_binary_tree/ray.h index 9dc30361..df58240b 100644 --- a/vcg/space/index/aabb_binary_tree/ray.h +++ b/vcg/space/index/aabb_binary_tree/ray.h @@ -60,8 +60,6 @@ public: template static inline ObjPtr Ray(TreeType & tree, OBJRAYISECTFUNCT & rayIntersection, const Ray3 & ray, const ScalarType & maxDist, ScalarType & t) { - typedef std::vector NodePtrVector; - typedef typename NodePtrVector::const_iterator NodePtrVector_ci; NodeType * pRoot = tree.pRoot; diff --git a/vcg/space/index/octree.h b/vcg/space/index/octree.h index bcd538ac..25df7310 100644 --- a/vcg/space/index/octree.h +++ b/vcg/space/index/octree.h @@ -500,7 +500,6 @@ OBJECT_RETRIEVER: //otherwise, retrieve the leaves and fill the container with the objects contained std::vector< NodePointer > leaves; - unsigned int object_count; int leaves_count; TemplatedOctree::ContainedLeaves(query_bounding_box, leaves, TemplatedOctree::Root(), TemplatedOctree::boundingBox); diff --git a/vcg/space/index/octree_template.h b/vcg/space/index/octree_template.h index 8b33a366..7a2f1d71 100644 --- a/vcg/space/index/octree_template.h +++ b/vcg/space/index/octree_template.h @@ -81,7 +81,9 @@ protected: parent = NULL; level = -1; } - + + virtual ~Node() {} + // Constructor: create a new Node Node(NodePointer parent, int level) { @@ -106,7 +108,7 @@ protected: */ struct InnerNode : public Node { - InnerNode() : Node() {}; + InnerNode() : Node() {} InnerNode(NodePointer parent, int level) : Node(parent, level) { memset(&sons[0], 0, 8*sizeof(Node*)); @@ -131,7 +133,7 @@ protected: */ struct Leaf : public Node { - Leaf() : Node() {}; + Leaf() : Node() {} Leaf(NodePointer parent, int level) : Node(parent, level) {} inline NodePointer &Son(int /*sonIndex*/)