diff --git a/CI/ci-cppcheck.sh b/CI/ci-cppcheck.sh
index a28333a0..69f1c107 100755
--- a/CI/ci-cppcheck.sh
+++ b/CI/ci-cppcheck.sh
@@ -32,7 +32,7 @@ echo "CPPCHECK Summary"
echo "=============================================================================="
echo -e "${NC}"
-MAX_COUNT=165
+MAX_COUNT=162
if [ $COUNT -gt $MAX_COUNT ]; then
echo -e ${WARNING}
diff --git a/Doc/changelog.docu b/Doc/changelog.docu
index a72e6449..6e6d11bf 100644
--- a/Doc/changelog.docu
+++ b/Doc/changelog.docu
@@ -13,6 +13,10 @@
Update Doxygen config format
+Build System
+
+- GTest is now automatically fetched via official git repository and build when unittests have been enabled
+
diff --git a/src/OpenMesh/Core/IO/reader/OMReader.cc b/src/OpenMesh/Core/IO/reader/OMReader.cc
index 5ed81c58..cab6fd42 100644
--- a/src/OpenMesh/Core/IO/reader/OMReader.cc
+++ b/src/OpenMesh/Core/IO/reader/OMReader.cc
@@ -155,7 +155,7 @@ bool _OMReader_::read(std::istream& _is, BaseImporter& _bi, Options& _opt)
//-----------------------------------------------------------------------------
-bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, Options& /* _opt */) const
+bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, const Options& /* _opt */) const
{
// not supported yet!
return false;
@@ -164,7 +164,7 @@ bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, Op
//-----------------------------------------------------------------------------
-bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt) const
+bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, const Options& _opt) const
{
bool swap_required = _opt.check(Options::Swap) || (Endian::local() == Endian::MSB);
diff --git a/src/OpenMesh/Core/IO/reader/OMReader.hh b/src/OpenMesh/Core/IO/reader/OMReader.hh
index ed042f68..26801477 100644
--- a/src/OpenMesh/Core/IO/reader/OMReader.hh
+++ b/src/OpenMesh/Core/IO/reader/OMReader.hh
@@ -110,8 +110,8 @@ private:
bool supports( const OMFormat::uint8 version ) const;
- bool read_ascii(std::istream& _is, BaseImporter& _bi, Options& _opt) const;
- bool read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt) const;
+ bool read_ascii(std::istream& _is, BaseImporter& _bi, const Options& _opt) const;
+ bool read_binary(std::istream& _is, BaseImporter& _bi, const Options& _opt) const;
typedef OMFormat::Header Header;
typedef OMFormat::Chunk::Header ChunkHeader;
diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh
index 7e41ebce..6cbb517f 100644
--- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh
+++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.hh
@@ -64,14 +64,6 @@
#include
-#if defined(OM_CC_MIPS) // avoid warnings
-# define MIPS_WARN_WA( Item ) \
- void raise(typename M:: ## Item ## Handle &_h, state_t _target_state ) \
- { Inherited::raise(_h, _target_state); }
-#else
-# define MIPS_WARN_WA( Item )
-#endif
-
//== NAMESPACE ================================================================
namespace OpenMesh { // BEGIN_NS_OPENMESH
@@ -103,7 +95,6 @@ public:
void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Edge) // avoid warning
};
@@ -155,8 +146,6 @@ public:
explicit VF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
- MIPS_WARN_WA(Edge)
- MIPS_WARN_WA(Vertex)
};
@@ -177,8 +166,6 @@ public:
explicit FF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
- MIPS_WARN_WA(Vertex) // avoid warning
- MIPS_WARN_WA(Edge ) // avoid warning
};
@@ -199,8 +186,6 @@ public:
explicit FFc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
- MIPS_WARN_WA(Vertex) // avoid warning
- MIPS_WARN_WA(Edge ) // avoid warning
};
@@ -221,8 +206,6 @@ public:
explicit FV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
};
@@ -243,8 +226,6 @@ public:
explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
static void init_coeffs(size_t _max_valence);
static const std::vector& coeffs() { return coeffs_; }
@@ -280,8 +261,6 @@ public:
explicit VV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
};
@@ -302,8 +281,6 @@ public:
explicit VVc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
};
@@ -324,8 +301,6 @@ public:
explicit VE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -346,8 +321,6 @@ public:
explicit VdE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -368,8 +341,6 @@ public:
explicit VdEc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -390,8 +361,6 @@ public:
explicit EV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
};
@@ -413,8 +382,6 @@ public:
explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
- MIPS_WARN_WA(Face) // avoid warning
- MIPS_WARN_WA(Edge) // avoid warning
static void init_coeffs(size_t _max_valence);
static const std::vector& coeffs() { return coeffs_; }
@@ -449,8 +416,6 @@ public:
explicit EF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
- MIPS_WARN_WA(Edge ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -471,8 +436,6 @@ public:
explicit FE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -493,8 +456,6 @@ public:
explicit EdE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
@@ -515,13 +476,10 @@ public:
explicit EdEc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
- MIPS_WARN_WA(Face ) // avoid warning
- MIPS_WARN_WA(Vertex) // avoid warning
};
// ----------------------------------------------------------------------------
-#undef MIPS_WARN_WA
//=============================================================================
} // END_NS_ADAPTIVE
diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh
index cbf6420f..20889a08 100644
--- a/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh
+++ b/src/OpenMesh/Tools/Subdivider/Uniform/SubdividerT.hh
@@ -166,8 +166,12 @@ protected:
/// \name Overload theses methods
//@{
- /// Prepare mesh, e.g. add properties
- virtual bool prepare( MeshType& _m ) = 0;
+ /** \brief Prepare mesh, e.g. add properties
+ *
+ * You have to reimplement this function to setup your mesh. The default implementation
+ * will always return false and therefore block your algorithm.
+ */
+ virtual bool prepare( MeshType& /*_m*/ ) { return false; };
/// Subdivide mesh \c _m \c _n times
virtual bool subdivide( MeshType& _m, size_t _n, const bool _update_points = true) = 0;
diff --git a/src/OpenMesh/Tools/Utils/Timer.cc b/src/OpenMesh/Tools/Utils/Timer.cc
index 37b85b05..afc67c1e 100644
--- a/src/OpenMesh/Tools/Utils/Timer.cc
+++ b/src/OpenMesh/Tools/Utils/Timer.cc
@@ -163,10 +163,10 @@ public:
~TimerImplPosix()
{ }
- virtual void reset(void) { seconds_ = 0.0; }
+ virtual void reset(void) override { seconds_ = 0.0; }
- virtual void start(void) { seconds_ = 0.0; clock_gettime( id_, &start_ ); }
- virtual void stop(void)
+ virtual void start(void) override { seconds_ = 0.0; clock_gettime( id_, &start_ ); }
+ virtual void stop(void) override
{
timespec stop;
clock_gettime( id_, &stop );
@@ -174,9 +174,9 @@ public:
seconds_ += ( (double(stop.tv_nsec-start_.tv_nsec)*1e-9) );
}
- virtual void cont(void) { clock_gettime( id_, &start_ ); }
+ virtual void cont(void) override { clock_gettime( id_, &start_ ); }
- virtual double seconds() const { return seconds_; }
+ virtual double seconds() override const { return seconds_; }
protected:
clockid_t id_;
diff --git a/src/OpenMesh/Tools/Utils/Timer.hh b/src/OpenMesh/Tools/Utils/Timer.hh
index f96870b5..b8b3b665 100644
--- a/src/OpenMesh/Tools/Utils/Timer.hh
+++ b/src/OpenMesh/Tools/Utils/Timer.hh
@@ -98,8 +98,12 @@ public:
Timer(void);
+ /// Make the timer non copyable
Timer(const Timer& _other) = delete;
+ /// Make the timer non copyable
+ Timer& operator=( const Timer& ) = delete;
+
~Timer(void);
/// Returns true if self is in a valid state!
@@ -144,6 +148,8 @@ public:
*/
static std::string as_string(double seconds, Format format = Automatic);
+
+
public:
//@{