Commit 25178d9d authored by Jan Möbius's avatar Jan Möbius

Fixed explicit making cppcheck fail and some lineendings

parent 5b9326a0
Pipeline #4217 failed with stage
in 44 minutes and 40 seconds
...@@ -85,7 +85,7 @@ class SoOpenMeshNodeT : public SoShape ...@@ -85,7 +85,7 @@ class SoOpenMeshNodeT : public SoShape
public: public:
static void initClass(); static void initClass();
SoOpenMeshNodeT(const Mesh* _mesh=0); explicit SoOpenMeshNodeT(const Mesh* _mesh=0);
void setMesh(const Mesh* mesh) { d_mesh = mesh; } void setMesh(const Mesh* mesh) { d_mesh = mesh; }
......
...@@ -96,7 +96,7 @@ template <class T> ...@@ -96,7 +96,7 @@ template <class T>
class multiplex_target : public basic_multiplex_target class multiplex_target : public basic_multiplex_target
{ {
public: public:
multiplex_target(T& _t) : target_(_t) {} explicit multiplex_target(T& _t) : target_(_t) {}
virtual void operator<<(const std::string& _s) { target_ << _s; } virtual void operator<<(const std::string& _s) { target_ << _s; }
private: private:
T& target_; T& target_;
......
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
* *
* @param _resolution specifies the desired resolution for the random number generated * @param _resolution specifies the desired resolution for the random number generated
*/ */
RandomNumberGenerator(const size_t _resolution); explicit RandomNumberGenerator(const size_t _resolution);
/// returns a random double between 0.0 and 1.0 with a guaranteed resolution /// returns a random double between 0.0 and 1.0 with a guaranteed resolution
double getRand() const; double getRand() const;
......
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
* *
* @param _notificationInterval Interval of decimation steps between notifications. * @param _notificationInterval Interval of decimation steps between notifications.
*/ */
Observer(size_t _notificationInterval); explicit Observer(size_t _notificationInterval);
/// Destructor /// Destructor
virtual ~Observer(); virtual ~Observer();
......
...@@ -115,7 +115,7 @@ public: ...@@ -115,7 +115,7 @@ public:
CatmullClarkT( ) : parent_t() { } CatmullClarkT( ) : parent_t() { }
/// Constructor /// Constructor
CatmullClarkT(MeshType &_m) : parent_t(_m) { } explicit CatmullClarkT(MeshType &_m) : parent_t(_m) { }
virtual ~CatmullClarkT() {} virtual ~CatmullClarkT() {}
......
...@@ -107,7 +107,7 @@ public: ...@@ -107,7 +107,7 @@ public:
/// Constructor to be used with interface 1 (calls attach()) /// Constructor to be used with interface 1 (calls attach())
/// \see operator()( MeshType&, size_t ) /// \see operator()( MeshType&, size_t )
SubdividerT( MeshType &_m ) : attached_(NULL) { attach(_m); } explicit SubdividerT( MeshType &_m ) : attached_(NULL) { attach(_m); }
//@} //@}
......
...@@ -74,7 +74,7 @@ using namespace std; ...@@ -74,7 +74,7 @@ using namespace std;
class GnuplotException : public runtime_error class GnuplotException : public runtime_error
{ {
public: public:
GnuplotException(const string &msg) : runtime_error(msg){} explicit GnuplotException(const string &msg) : runtime_error(msg){}
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
...@@ -113,7 +113,7 @@ public: ...@@ -113,7 +113,7 @@ public:
Gnuplot(); Gnuplot();
/// Set a style during construction. /// Set a style during construction.
Gnuplot(const string & _style); explicit Gnuplot(const string & _style);
/// Constructor calling plot_xy(). /// Constructor calling plot_xy().
Gnuplot(const string & _title, Gnuplot(const string & _title,
......
...@@ -80,7 +80,7 @@ class MeshCheckerT ...@@ -80,7 +80,7 @@ class MeshCheckerT
public: public:
/// constructor /// constructor
MeshCheckerT(const Mesh& _mesh) : mesh_(_mesh) {} explicit MeshCheckerT(const Mesh& _mesh) : mesh_(_mesh) {}
/// destructor /// destructor
~MeshCheckerT() {} ~MeshCheckerT() {}
......
...@@ -37,97 +37,97 @@ ...@@ -37,97 +37,97 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
* * * *
* ========================================================================= */ * ========================================================================= */
/*===========================================================================*\ /*===========================================================================*\
* * * *
* $Revision$ * * $Revision$ *
* $Date$ * * $Date$ *
* * * *
\*===========================================================================*/ \*===========================================================================*/
//============================================================================= //=============================================================================
// //
// CLASS newClass // CLASS newClass
// //
//============================================================================= //=============================================================================
#ifndef OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH #ifndef OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH
#define OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH #define OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <vector> #include <vector>
#include <cassert> #include <cassert>
//== FORWARDDECLARATIONS ====================================================== //== FORWARDDECLARATIONS ======================================================
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
namespace OpenMesh { namespace OpenMesh {
namespace VDPM { namespace VDPM {
//== CLASS DEFINITION ========================================================= //== CLASS DEFINITION =========================================================
/** Index of vertex hierarchy node /** Index of vertex hierarchy node
*/ */
class VHierarchyNodeIndex class VHierarchyNodeIndex
{ {
private: private:
unsigned int value_; unsigned int value_;
public: public:
static const VHierarchyNodeIndex InvalidIndex; static const VHierarchyNodeIndex InvalidIndex;
public: public:
VHierarchyNodeIndex() VHierarchyNodeIndex()
{ value_ = 0; } { value_ = 0; }
VHierarchyNodeIndex(unsigned int _value) explicit VHierarchyNodeIndex(unsigned int _value)
{ value_ = _value; } { value_ = _value; }
VHierarchyNodeIndex(const VHierarchyNodeIndex &_other) VHierarchyNodeIndex(const VHierarchyNodeIndex &_other)
{ value_ = _other.value_; } { value_ = _other.value_; }
VHierarchyNodeIndex(unsigned int _tree_id, VHierarchyNodeIndex(unsigned int _tree_id,
unsigned int _node_id, unsigned int _node_id,
unsigned short _tree_id_bits) unsigned short _tree_id_bits)
{ {
assert(_tree_id < ((unsigned int) 0x00000001 << _tree_id_bits)); assert(_tree_id < ((unsigned int) 0x00000001 << _tree_id_bits));
assert(_node_id < ((unsigned int) 0x00000001 << (32 - _tree_id_bits))); assert(_node_id < ((unsigned int) 0x00000001 << (32 - _tree_id_bits)));
value_ = (_tree_id << (32 - _tree_id_bits)) | _node_id; value_ = (_tree_id << (32 - _tree_id_bits)) | _node_id;
} }
bool is_valid(unsigned short _tree_id_bits) const bool is_valid(unsigned short _tree_id_bits) const
{ return node_id(_tree_id_bits) != 0 ? true : false; } { return node_id(_tree_id_bits) != 0 ? true : false; }
unsigned int tree_id(unsigned short _tree_id_bits) const unsigned int tree_id(unsigned short _tree_id_bits) const
{ return value_ >> (32 - _tree_id_bits); } { return value_ >> (32 - _tree_id_bits); }
unsigned int node_id(unsigned short _tree_id_bits) const unsigned int node_id(unsigned short _tree_id_bits) const
{ return value_ & ((unsigned int) 0xFFFFFFFF >> _tree_id_bits); } { return value_ & ((unsigned int) 0xFFFFFFFF >> _tree_id_bits); }
bool operator< (const VHierarchyNodeIndex &other) const bool operator< (const VHierarchyNodeIndex &other) const
{ return (value_ < other.value_) ? true : false; } { return (value_ < other.value_) ? true : false; }
unsigned int value() const unsigned int value() const
{ return value_; } { return value_; }
}; };
/// Container for vertex hierarchy node indices /// Container for vertex hierarchy node indices
typedef std::vector<VHierarchyNodeIndex> VHierarchyNodeIndexContainer; typedef std::vector<VHierarchyNodeIndex> VHierarchyNodeIndexContainer;
//============================================================================= //=============================================================================
} // namespace VDPM } // namespace VDPM
} // namespace OpenMesh } // namespace OpenMesh
//============================================================================= //=============================================================================
#endif // OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH defined #endif // OPENMESH_VDPROGMESH_VHIERARCHYNODEINDEX_HH defined
//============================================================================= //=============================================================================
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment