Some more cppcheck fixes

This commit is contained in:
Jan Möbius
2023-03-01 12:58:05 +01:00
parent c18457ae02
commit 12e1efdb8a
11 changed files with 77 additions and 77 deletions

View File

@@ -125,21 +125,21 @@ public:
std::streamsize _precision = 6) const = 0;
/// Returns expected size of file if binary format is supported else 0.
virtual size_t binary_size(BaseExporter&, Options) const { return 0; }
virtual size_t binary_size(BaseExporter&, const Options&) const { return 0; }
protected:
bool check(BaseExporter& _be, Options _opt) const
bool check(BaseExporter& _be, const Options& _writeOptions) const
{
// Check for all Options. When we want to write them (_opt.check() ) , they have to be available ( has_ )
// Converts to not A (write them) or B (available)
return ( !_opt.check(Options::VertexNormal ) || _be.has_vertex_normals())
&& ( !_opt.check(Options::VertexTexCoord)|| _be.has_vertex_texcoords())
&& ( !_opt.check(Options::VertexColor) || _be.has_vertex_colors())
&& ( !_opt.check(Options::FaceNormal) || _be.has_face_normals())
&& ( !_opt.check(Options::FaceColor) || _be.has_face_colors());
return ( !_writeOptions.check(Options::VertexNormal ) || _be.has_vertex_normals())
&& ( !_writeOptions.check(Options::VertexTexCoord)|| _be.has_vertex_texcoords())
&& ( !_writeOptions.check(Options::VertexColor) || _be.has_vertex_colors())
&& ( !_writeOptions.check(Options::FaceNormal) || _be.has_face_normals())
&& ( !_writeOptions.check(Options::FaceColor) || _be.has_face_colors());
}
};