diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h index bd9d3a69..9bcc0e30 100644 --- a/vcg/math/matrix44.h +++ b/vcg/math/matrix44.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/vcg/space/index/octree.h b/vcg/space/index/octree.h index 25df7310..328ae419 100644 --- a/vcg/space/index/octree.h +++ b/vcg/space/index/octree.h @@ -25,6 +25,7 @@ #define VCG_SPACE_INDEX_OCTREE_H #include +#include #ifdef __glut_h__ #include @@ -212,11 +213,11 @@ namespace vcg public: Octree() { - marks=0; + //marks=0; } ~Octree() { - if(marks) delete []marks; + //if(marks) delete []marks; int node_count = TemplatedOctree::NodeCount(); for (int i=0; i()); std::vector< NodePointer > filled_leaves(placeholder_count); @@ -537,7 +539,7 @@ OBJECT_RETRIEVER: /*! * Markers used to avoid duplication of the same result during a query */ - unsigned char *marks; + std::vector marks; unsigned char global_mark; /*! @@ -561,7 +563,7 @@ OBJECT_RETRIEVER: global_mark = (global_mark+1)%255; if (global_mark == 0) { - memset(&marks[0], 0, sizeof(unsigned char)*int(sorted_dataset.size())); + std::fill(marks.begin(), marks.begin() + sorted_dataset.size(), 0); global_mark++; } };//end of IncrementMark