Fixed some cppcheck warnings
This commit is contained in:
@@ -1062,7 +1062,7 @@ std::string get_property_name(std::string _string1, std::string _string2) {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
_PLYReader_::ValueType get_property_type(std::string _string1, std::string _string2) {
|
||||
_PLYReader_::ValueType get_property_type(std::string& _string1, std::string& _string2) {
|
||||
|
||||
if (_string1 == "float32" || _string2 == "float32")
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ class CmpVec
|
||||
{
|
||||
public:
|
||||
|
||||
CmpVec(float _eps=FLT_MIN) : eps_(_eps) {}
|
||||
explicit CmpVec(float _eps=FLT_MIN) : eps_(_eps) {}
|
||||
|
||||
bool operator()( const Vec3f& _v0, const Vec3f& _v1 ) const
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ _OMWriter_::write(std::ostream& _os, BaseExporter& _be, Options _opt, std::strea
|
||||
#ifndef DOXY_IGNORE_THIS
|
||||
template <typename T> struct Enabler
|
||||
{
|
||||
Enabler( T& obj ) : obj_(obj)
|
||||
explicit Enabler( T& obj ) : obj_(obj)
|
||||
{}
|
||||
|
||||
~Enabler() { obj_.enable(); }
|
||||
|
||||
@@ -158,7 +158,7 @@ write_stla(const std::string& _filename, BaseExporter& _be, Options /* _opt */)
|
||||
|
||||
|
||||
|
||||
int i, nF(int(_be.n_faces())), nV;
|
||||
int i, nF(int(_be.n_faces()));
|
||||
Vec3f a, b, c, n;
|
||||
std::vector<VertexHandle> vhandles;
|
||||
FaceHandle fh;
|
||||
@@ -172,7 +172,7 @@ write_stla(const std::string& _filename, BaseExporter& _be, Options /* _opt */)
|
||||
for (i=0; i<nF; ++i)
|
||||
{
|
||||
fh = FaceHandle(i);
|
||||
nV = _be.get_vhandles(fh, vhandles);
|
||||
const int nV = _be.get_vhandles(fh, vhandles);
|
||||
|
||||
if (nV == 3)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ write_stla(std::ostream& _out, BaseExporter& _be, Options /* _opt */, std::strea
|
||||
{
|
||||
omlog() << "[STLWriter] : write ascii file\n";
|
||||
|
||||
int i, nF(int(_be.n_faces())), nV;
|
||||
int i, nF(int(_be.n_faces()));
|
||||
Vec3f a, b, c, n;
|
||||
std::vector<VertexHandle> vhandles;
|
||||
FaceHandle fh;
|
||||
@@ -226,7 +226,7 @@ write_stla(std::ostream& _out, BaseExporter& _be, Options /* _opt */, std::strea
|
||||
for (i=0; i<nF; ++i)
|
||||
{
|
||||
fh = FaceHandle(i);
|
||||
nV = _be.get_vhandles(fh, vhandles);
|
||||
const int nV = _be.get_vhandles(fh, vhandles);
|
||||
|
||||
if (nV == 3)
|
||||
{
|
||||
@@ -273,7 +273,7 @@ write_stlb(const std::string& _filename, BaseExporter& _be, Options /* _opt */)
|
||||
}
|
||||
|
||||
|
||||
int i, nF(int(_be.n_faces())), nV;
|
||||
int i, nF(int(_be.n_faces()));
|
||||
Vec3f a, b, c, n;
|
||||
std::vector<VertexHandle> vhandles;
|
||||
FaceHandle fh;
|
||||
@@ -294,7 +294,7 @@ write_stlb(const std::string& _filename, BaseExporter& _be, Options /* _opt */)
|
||||
for (i=0; i<nF; ++i)
|
||||
{
|
||||
fh = FaceHandle(i);
|
||||
nV = _be.get_vhandles(fh, vhandles);
|
||||
const int nV = _be.get_vhandles(fh, vhandles);
|
||||
|
||||
if (nV == 3)
|
||||
{
|
||||
@@ -344,7 +344,7 @@ write_stlb(std::ostream& _out, BaseExporter& _be, Options /* _opt */, std::strea
|
||||
omlog() << "[STLWriter] : write binary file\n";
|
||||
|
||||
|
||||
int i, nF(int(_be.n_faces())), nV;
|
||||
int i, nF(int(_be.n_faces()));
|
||||
Vec3f a, b, c, n;
|
||||
std::vector<VertexHandle> vhandles;
|
||||
FaceHandle fh;
|
||||
@@ -366,7 +366,7 @@ write_stlb(std::ostream& _out, BaseExporter& _be, Options /* _opt */, std::strea
|
||||
for (i=0; i<nF; ++i)
|
||||
{
|
||||
fh = FaceHandle(i);
|
||||
nV = _be.get_vhandles(fh, vhandles);
|
||||
const int nV = _be.get_vhandles(fh, vhandles);
|
||||
|
||||
if (nV == 3)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user