cppcheck
This commit is contained in:
@@ -252,7 +252,7 @@ namespace OMFormat {
|
||||
|
||||
PropertyName( ) { }
|
||||
|
||||
PropertyName( const std::string& _name ) { *this = _name; }
|
||||
explicit PropertyName( const std::string& _name ) { *this = _name; }
|
||||
|
||||
bool is_valid() const { return is_valid( size() ); }
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class ExporterT : public BaseExporter
|
||||
public:
|
||||
|
||||
// Constructor
|
||||
ExporterT(const Mesh& _mesh) : mesh_(_mesh) {}
|
||||
explicit ExporterT(const Mesh& _mesh) : mesh_(_mesh) {}
|
||||
|
||||
|
||||
// get vertex data
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
typedef std::vector<VertexHandle> VHandles;
|
||||
|
||||
|
||||
ImporterT(Mesh& _mesh) : mesh_(_mesh), halfedgeNormals_() {}
|
||||
explicit ImporterT(Mesh& _mesh) : mesh_(_mesh), halfedgeNormals_() {}
|
||||
|
||||
|
||||
virtual VertexHandle add_vertex(const Vec3f& _point) override
|
||||
|
||||
@@ -387,10 +387,12 @@ bool _OMReader_::read_binary_vertex_chunk(std::istream &_is, BaseImporter &_bi,
|
||||
default: // skip unknown chunks
|
||||
{
|
||||
omerr() << "Unknown chunk type ignored!\n";
|
||||
size_t size_of = header_.n_vertices_ * OMFormat::vector_size(chunk_header_);
|
||||
_is.ignore(size_of);
|
||||
bytes_ += size_of;
|
||||
size_t chunk_size = header_.n_vertices_ * OMFormat::vector_size(chunk_header_);
|
||||
_is.ignore(chunk_size);
|
||||
bytes_ += chunk_size;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// all chunk data has been read..?!
|
||||
@@ -505,9 +507,9 @@ bool _OMReader_::read_binary_face_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
default: // skip unknown chunks
|
||||
{
|
||||
omerr() << "Unknown chunk type ignore!\n";
|
||||
size_t size_of = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(size_of);
|
||||
bytes_ += size_of;
|
||||
size_t chunk_size = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(chunk_size);
|
||||
bytes_ += chunk_size;
|
||||
}
|
||||
}
|
||||
return fidx == header_.n_faces_;
|
||||
@@ -549,9 +551,9 @@ bool _OMReader_::read_binary_edge_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
|
||||
default:
|
||||
// skip unknown type
|
||||
size_t size_of = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(size_of);
|
||||
bytes_ += size_of;
|
||||
size_t chunk_size = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(chunk_size);
|
||||
bytes_ += chunk_size;
|
||||
}
|
||||
|
||||
return b < bytes_;
|
||||
@@ -627,9 +629,9 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi
|
||||
default:
|
||||
// skip unknown chunk
|
||||
omerr() << "Unknown chunk type ignored!\n";
|
||||
size_t size_of = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(size_of);
|
||||
bytes_ += size_of;
|
||||
size_t chunk_size = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(chunk_size);
|
||||
bytes_ += chunk_size;
|
||||
}
|
||||
|
||||
return b < bytes_;
|
||||
@@ -655,9 +657,9 @@ bool _OMReader_::read_binary_mesh_chunk(std::istream &_is, BaseImporter &_bi, Op
|
||||
|
||||
default:
|
||||
// skip unknown chunk
|
||||
size_t size_of = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(size_of);
|
||||
bytes_ += size_of;
|
||||
size_t chunk_size = OMFormat::chunk_data_size(header_, chunk_header_);
|
||||
_is.ignore(chunk_size);
|
||||
bytes_ += chunk_size;
|
||||
}
|
||||
|
||||
return b < bytes_;
|
||||
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
{
|
||||
ValueType type;
|
||||
const BaseProperty* property;
|
||||
CustomProperty(const BaseProperty* const _p):type(Unsupported),property(_p){}
|
||||
explicit CustomProperty(const BaseProperty* const _p):type(Unsupported),property(_p){}
|
||||
};
|
||||
|
||||
const char* nameOfType_[12];
|
||||
|
||||
Reference in New Issue
Block a user