From e93fa6699a0ab029ca09e4ea04e5b281187086b7 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Thu, 25 Aug 2022 12:20:13 -0400 Subject: [PATCH] Manually fix up 100 more instances where it should be defaulted --- code/AssetLib/3DS/3DSExporter.cpp | 4 +--- code/AssetLib/3DS/3DSLoader.cpp | 4 +--- code/AssetLib/3MF/D3MFImporter.cpp | 9 ++------- code/AssetLib/AC/ACLoader.cpp | 4 +--- code/AssetLib/ASE/ASELoader.cpp | 4 +--- code/AssetLib/Blender/BlenderTessellator.cpp | 2 +- code/AssetLib/Blender/BlenderTessellator.h | 2 +- code/AssetLib/COB/COBLoader.cpp | 8 ++------ code/AssetLib/Collada/ColladaLoader.cpp | 4 +--- code/AssetLib/DXF/DXFLoader.cpp | 9 ++------- code/AssetLib/FBX/FBXMaterial.cpp | 12 +++--------- code/AssetLib/FBX/FBXMeshGeometry.cpp | 8 ++------ code/AssetLib/FBX/FBXTokenizer.cpp | 2 +- code/AssetLib/FBX/FBXTokenizer.h | 2 +- code/AssetLib/HMP/HMPLoader.cpp | 8 ++------ code/AssetLib/Irr/IRRLoader.cpp | 4 +--- code/AssetLib/LWO/LWOLoader.cpp | 4 +--- code/AssetLib/LWS/LWSLoader.cpp | 4 +--- code/AssetLib/MD5/MD5Loader.cpp | 4 +--- code/AssetLib/MDC/MDCLoader.cpp | 4 +--- code/AssetLib/MDL/MDLLoader.cpp | 4 +--- code/AssetLib/MMD/MMDImporter.cpp | 4 +--- code/AssetLib/Obj/ObjExporter.cpp | 4 +--- code/AssetLib/Obj/ObjFileMtlImporter.cpp | 4 +--- code/AssetLib/OpenGEX/OpenGEXExporter.cpp | 2 +- code/AssetLib/OpenGEX/OpenGEXExporter.h | 2 +- code/AssetLib/Ply/PlyExporter.cpp | 4 +--- code/AssetLib/Ply/PlyLoader.cpp | 4 +--- code/AssetLib/Q3D/Q3DLoader.cpp | 8 ++------ code/AssetLib/Raw/RawLoader.cpp | 8 ++------ code/AssetLib/SIB/SIBImporter.cpp | 8 ++------ code/AssetLib/SMD/SMDLoader.cpp | 9 +++------ code/AssetLib/Terragen/TerragenLoader.cpp | 4 +--- code/AssetLib/Unreal/UnrealLoader.cpp | 4 +--- code/AssetLib/X/XFileImporter.cpp | 4 +--- code/AssetLib/glTF/glTFImporter.cpp | 4 +--- code/AssetLib/glTF2/glTF2Exporter.cpp | 4 +--- code/AssetLib/glTF2/glTF2Importer.cpp | 4 +--- code/Common/BaseImporter.cpp | 4 +--- code/Common/Exporter.cpp | 13 ++----------- code/Common/SpatialSort.cpp | 4 +--- code/Pbrt/PbrtExporter.cpp | 4 +--- code/PostProcessing/ArmaturePopulate.cpp | 9 ++------- code/PostProcessing/CalcTangentsProcess.cpp | 4 +--- code/PostProcessing/ComputeUVMappingProcess.cpp | 10 ++-------- code/PostProcessing/DeboneProcess.cpp | 5 +---- code/PostProcessing/DropFaceNormalsProcess.cpp | 10 ++-------- code/PostProcessing/EmbedTexturesProcess.cpp | 9 ++------- code/PostProcessing/FindDegenerates.cpp | 4 +--- code/PostProcessing/FindInvalidDataProcess.cpp | 4 +--- code/PostProcessing/FixNormalsStep.cpp | 10 ++-------- code/PostProcessing/GenBoundingBoxesProcess.cpp | 9 ++------- code/PostProcessing/GenFaceNormalsProcess.cpp | 8 ++------ code/PostProcessing/GenVertexNormalsProcess.cpp | 4 +--- code/PostProcessing/ImproveCacheLocality.cpp | 4 +--- code/PostProcessing/JoinVerticesProcess.cpp | 8 ++------ code/PostProcessing/LimitBoneWeightsProcess.cpp | 5 +---- code/PostProcessing/MakeVerboseFormat.cpp | 8 ++------ code/PostProcessing/OptimizeGraph.cpp | 4 +--- code/PostProcessing/OptimizeMeshes.cpp | 4 +--- code/PostProcessing/RemoveRedundantMaterials.cpp | 5 +---- code/PostProcessing/ScaleProcess.cpp | 4 +--- code/PostProcessing/SortByPTypeProcess.cpp | 4 +--- code/PostProcessing/SplitByBoneCountProcess.cpp | 5 +---- code/PostProcessing/SplitLargeMeshes.cpp | 8 ++------ code/PostProcessing/TextureTransform.cpp | 5 +---- code/PostProcessing/TriangulateProcess.cpp | 10 ++-------- include/assimp/IOSystem.hpp | 4 +--- include/assimp/LogStream.hpp | 8 ++------ include/assimp/aabb.h | 4 +--- tools/assimp_cmd/CompareDump.cpp | 3 +-- 71 files changed, 96 insertions(+), 295 deletions(-) diff --git a/code/AssetLib/3DS/3DSExporter.cpp b/code/AssetLib/3DS/3DSExporter.cpp index 71588f935..1b335a272 100644 --- a/code/AssetLib/3DS/3DSExporter.cpp +++ b/code/AssetLib/3DS/3DSExporter.cpp @@ -209,9 +209,7 @@ Discreet3DSExporter::Discreet3DSExporter(std::shared_ptr &outfile, con } // ------------------------------------------------------------------------------------------------ -Discreet3DSExporter::~Discreet3DSExporter() { - // empty -} +Discreet3DSExporter::~Discreet3DSExporter() = default; // ------------------------------------------------------------------------------------------------ int Discreet3DSExporter::WriteHierarchy(const aiNode &node, int seq, int sibling_level) { diff --git a/code/AssetLib/3DS/3DSLoader.cpp b/code/AssetLib/3DS/3DSLoader.cpp index e6bc3a171..769e8a6ee 100644 --- a/code/AssetLib/3DS/3DSLoader.cpp +++ b/code/AssetLib/3DS/3DSLoader.cpp @@ -105,9 +105,7 @@ Discreet3DSImporter::Discreet3DSImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -Discreet3DSImporter::~Discreet3DSImporter() { - // empty -} +Discreet3DSImporter::~Discreet3DSImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/3MF/D3MFImporter.cpp b/code/AssetLib/3MF/D3MFImporter.cpp index 5b0f34c3a..5d9644fa5 100644 --- a/code/AssetLib/3MF/D3MFImporter.cpp +++ b/code/AssetLib/3MF/D3MFImporter.cpp @@ -81,14 +81,9 @@ static const aiImporterDesc desc = { "3mf" }; -D3MFImporter::D3MFImporter() : - BaseImporter() { - // empty -} +D3MFImporter::D3MFImporter() = default; -D3MFImporter::~D3MFImporter() { - // empty -} +D3MFImporter::~D3MFImporter() = default; bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool /*checkSig*/) const { if (!ZipArchiveIOSystem::isZipArchive(pIOHandler, filename)) { diff --git a/code/AssetLib/AC/ACLoader.cpp b/code/AssetLib/AC/ACLoader.cpp index 410e04c2a..26bc2e9d5 100644 --- a/code/AssetLib/AC/ACLoader.cpp +++ b/code/AssetLib/AC/ACLoader.cpp @@ -146,9 +146,7 @@ AC3DImporter::AC3DImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -AC3DImporter::~AC3DImporter() { - // nothing to be done here -} +AC3DImporter::~AC3DImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/ASE/ASELoader.cpp b/code/AssetLib/ASE/ASELoader.cpp index 41f5639b5..f78ff99fb 100644 --- a/code/AssetLib/ASE/ASELoader.cpp +++ b/code/AssetLib/ASE/ASELoader.cpp @@ -89,9 +89,7 @@ ASEImporter::ASEImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -ASEImporter::~ASEImporter() { - // empty -} +ASEImporter::~ASEImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Blender/BlenderTessellator.cpp b/code/AssetLib/Blender/BlenderTessellator.cpp index 595d735d6..d3ef5ae5e 100644 --- a/code/AssetLib/Blender/BlenderTessellator.cpp +++ b/code/AssetLib/Blender/BlenderTessellator.cpp @@ -274,7 +274,7 @@ BlenderTessellatorP2T::BlenderTessellatorP2T( BlenderBMeshConverter& converter ) } // ------------------------------------------------------------------------------------------------ -BlenderTessellatorP2T::~BlenderTessellatorP2T() = default; + // ------------------------------------------------------------------------------------------------ void BlenderTessellatorP2T::Tessellate( const MLoop* polyLoop, int vertexCount, const std::vector< MVert >& vertices ) diff --git a/code/AssetLib/Blender/BlenderTessellator.h b/code/AssetLib/Blender/BlenderTessellator.h index 0d0ba320e..87703f99d 100644 --- a/code/AssetLib/Blender/BlenderTessellator.h +++ b/code/AssetLib/Blender/BlenderTessellator.h @@ -186,7 +186,7 @@ namespace Assimp { public: BlenderTessellatorP2T( BlenderBMeshConverter& converter ); - ~BlenderTessellatorP2T( ); + ~BlenderTessellatorP2T( ) = default; void Tessellate( const Blender::MLoop* polyLoop, int vertexCount, const std::vector< Blender::MVert >& vertices ); diff --git a/code/AssetLib/COB/COBLoader.cpp b/code/AssetLib/COB/COBLoader.cpp index 687f1cbd0..3e4c63b63 100644 --- a/code/AssetLib/COB/COBLoader.cpp +++ b/code/AssetLib/COB/COBLoader.cpp @@ -91,15 +91,11 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -COBImporter::COBImporter() { - // empty -} +COBImporter::COBImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -COBImporter::~COBImporter() { - // empty -} +COBImporter::~COBImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Collada/ColladaLoader.cpp b/code/AssetLib/Collada/ColladaLoader.cpp index fdc9c1c8f..405944f29 100644 --- a/code/AssetLib/Collada/ColladaLoader.cpp +++ b/code/AssetLib/Collada/ColladaLoader.cpp @@ -111,9 +111,7 @@ ColladaLoader::ColladaLoader() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -ColladaLoader::~ColladaLoader() { - // empty -} +ColladaLoader::~ColladaLoader() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/DXF/DXFLoader.cpp b/code/AssetLib/DXF/DXFLoader.cpp index 3b77e0ea9..f0091f01e 100644 --- a/code/AssetLib/DXF/DXFLoader.cpp +++ b/code/AssetLib/DXF/DXFLoader.cpp @@ -110,16 +110,11 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -DXFImporter::DXFImporter() -: BaseImporter() { - // empty -} +DXFImporter::DXFImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -DXFImporter::~DXFImporter() { - // empty -} +DXFImporter::~DXFImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/FBX/FBXMaterial.cpp b/code/AssetLib/FBX/FBXMaterial.cpp index 2162670f8..0db0ec6d7 100644 --- a/code/AssetLib/FBX/FBXMaterial.cpp +++ b/code/AssetLib/FBX/FBXMaterial.cpp @@ -136,9 +136,7 @@ Material::Material(uint64_t id, const Element& element, const Document& doc, con // ------------------------------------------------------------------------------------------------ -Material::~Material() { - // empty -} +Material::~Material() = default; aiVector2D uvTrans; aiVector2D uvScaling; @@ -255,9 +253,7 @@ Texture::Texture(uint64_t id, const Element& element, const Document& doc, const } -Texture::~Texture() { - // empty -} +Texture::~Texture() = default; LayeredTexture::LayeredTexture(uint64_t id, const Element& element, const Document& /*doc*/, const std::string& name) : Object(id,element,name), @@ -276,9 +272,7 @@ LayeredTexture::LayeredTexture(uint64_t id, const Element& element, const Docume } } -LayeredTexture::~LayeredTexture() { - // empty -} +LayeredTexture::~LayeredTexture() = default; void LayeredTexture::fillTexture(const Document& doc) { const std::vector& conns = doc.GetConnectionsByDestinationSequenced(ID()); diff --git a/code/AssetLib/FBX/FBXMeshGeometry.cpp b/code/AssetLib/FBX/FBXMeshGeometry.cpp index a0fb0e57e..58bacfad4 100644 --- a/code/AssetLib/FBX/FBXMeshGeometry.cpp +++ b/code/AssetLib/FBX/FBXMeshGeometry.cpp @@ -665,9 +665,7 @@ ShapeGeometry::ShapeGeometry(uint64_t id, const Element& element, const std::str } // ------------------------------------------------------------------------------------------------ -ShapeGeometry::~ShapeGeometry() { - // empty -} +ShapeGeometry::~ShapeGeometry() = default; // ------------------------------------------------------------------------------------------------ const std::vector& ShapeGeometry::GetVertices() const { return m_vertices; @@ -695,9 +693,7 @@ LineGeometry::LineGeometry(uint64_t id, const Element& element, const std::strin } // ------------------------------------------------------------------------------------------------ -LineGeometry::~LineGeometry() { - // empty -} +LineGeometry::~LineGeometry() = default; // ------------------------------------------------------------------------------------------------ const std::vector& LineGeometry::GetVertices() const { return m_vertices; diff --git a/code/AssetLib/FBX/FBXTokenizer.cpp b/code/AssetLib/FBX/FBXTokenizer.cpp index 4ef4aff95..f63e687e8 100644 --- a/code/AssetLib/FBX/FBXTokenizer.cpp +++ b/code/AssetLib/FBX/FBXTokenizer.cpp @@ -79,7 +79,7 @@ Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int } // ------------------------------------------------------------------------------------------------ -Token::~Token() = default; + namespace { diff --git a/code/AssetLib/FBX/FBXTokenizer.h b/code/AssetLib/FBX/FBXTokenizer.h index 877950945..5ed48e61d 100644 --- a/code/AssetLib/FBX/FBXTokenizer.h +++ b/code/AssetLib/FBX/FBXTokenizer.h @@ -96,7 +96,7 @@ public: /** construct a binary token */ Token(const char* sbegin, const char* send, TokenType type, size_t offset); - ~Token(); + ~Token() = default; public: std::string StringContents() const { diff --git a/code/AssetLib/HMP/HMPLoader.cpp b/code/AssetLib/HMP/HMPLoader.cpp index 1625cb359..79fdae807 100644 --- a/code/AssetLib/HMP/HMPLoader.cpp +++ b/code/AssetLib/HMP/HMPLoader.cpp @@ -72,15 +72,11 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -HMPImporter::HMPImporter() { - // nothing to do here -} +HMPImporter::HMPImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -HMPImporter::~HMPImporter() { - // nothing to do here -} +HMPImporter::~HMPImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Irr/IRRLoader.cpp b/code/AssetLib/Irr/IRRLoader.cpp index 3103a6cc8..c4058a4c2 100644 --- a/code/AssetLib/Irr/IRRLoader.cpp +++ b/code/AssetLib/Irr/IRRLoader.cpp @@ -88,9 +88,7 @@ IRRImporter::IRRImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -IRRImporter::~IRRImporter() { - // empty -} +IRRImporter::~IRRImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/LWO/LWOLoader.cpp b/code/AssetLib/LWO/LWOLoader.cpp index 31b0befca..be7d54700 100644 --- a/code/AssetLib/LWO/LWOLoader.cpp +++ b/code/AssetLib/LWO/LWOLoader.cpp @@ -100,9 +100,7 @@ LWOImporter::LWOImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -LWOImporter::~LWOImporter() { - // empty -} +LWOImporter::~LWOImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/LWS/LWSLoader.cpp b/code/AssetLib/LWS/LWSLoader.cpp index f830fc7b6..c5de55035 100644 --- a/code/AssetLib/LWS/LWSLoader.cpp +++ b/code/AssetLib/LWS/LWSLoader.cpp @@ -141,9 +141,7 @@ LWSImporter::LWSImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -LWSImporter::~LWSImporter() { - // nothing to do here -} +LWSImporter::~LWSImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/MD5/MD5Loader.cpp b/code/AssetLib/MD5/MD5Loader.cpp index 2d5da4d92..6c6758356 100644 --- a/code/AssetLib/MD5/MD5Loader.cpp +++ b/code/AssetLib/MD5/MD5Loader.cpp @@ -94,9 +94,7 @@ MD5Importer::MD5Importer() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -MD5Importer::~MD5Importer() { - // empty -} +MD5Importer::~MD5Importer() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/MDC/MDCLoader.cpp b/code/AssetLib/MDC/MDCLoader.cpp index c96cc78fc..b107516de 100644 --- a/code/AssetLib/MDC/MDCLoader.cpp +++ b/code/AssetLib/MDC/MDCLoader.cpp @@ -105,9 +105,7 @@ MDCImporter::MDCImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -MDCImporter::~MDCImporter() { - // empty -} +MDCImporter::~MDCImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/MDL/MDLLoader.cpp b/code/AssetLib/MDL/MDLLoader.cpp index 9c9cf910c..b2bd2d2f1 100644 --- a/code/AssetLib/MDL/MDLLoader.cpp +++ b/code/AssetLib/MDL/MDLLoader.cpp @@ -98,9 +98,7 @@ MDLImporter::MDLImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -MDLImporter::~MDLImporter() { - // empty -} +MDLImporter::~MDLImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/MMD/MMDImporter.cpp b/code/AssetLib/MMD/MMDImporter.cpp index 4445c2993..7a9030b64 100644 --- a/code/AssetLib/MMD/MMDImporter.cpp +++ b/code/AssetLib/MMD/MMDImporter.cpp @@ -83,9 +83,7 @@ MMDImporter::MMDImporter() : // ------------------------------------------------------------------------------------------------ // Destructor. -MMDImporter::~MMDImporter() { - // empty -} +MMDImporter::~MMDImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns true, if file is an pmx file. diff --git a/code/AssetLib/Obj/ObjExporter.cpp b/code/AssetLib/Obj/ObjExporter.cpp index 502960a0b..189164769 100644 --- a/code/AssetLib/Obj/ObjExporter.cpp +++ b/code/AssetLib/Obj/ObjExporter.cpp @@ -137,9 +137,7 @@ ObjExporter::ObjExporter(const char* _filename, const aiScene* pScene, bool noMt } // ------------------------------------------------------------------------------------------------ -ObjExporter::~ObjExporter() { - // empty -} +ObjExporter::~ObjExporter() = default; // ------------------------------------------------------------------------------------------------ std::string ObjExporter::GetMaterialLibName() { diff --git a/code/AssetLib/Obj/ObjFileMtlImporter.cpp b/code/AssetLib/Obj/ObjFileMtlImporter.cpp index 49a3af603..a0f6035ac 100644 --- a/code/AssetLib/Obj/ObjFileMtlImporter.cpp +++ b/code/AssetLib/Obj/ObjFileMtlImporter.cpp @@ -108,9 +108,7 @@ ObjFileMtlImporter::ObjFileMtlImporter(std::vector &buffer, // ------------------------------------------------------------------- // Destructor -ObjFileMtlImporter::~ObjFileMtlImporter() { - // empty -} +ObjFileMtlImporter::~ObjFileMtlImporter() = default; // ------------------------------------------------------------------- // Loads the material description diff --git a/code/AssetLib/OpenGEX/OpenGEXExporter.cpp b/code/AssetLib/OpenGEX/OpenGEXExporter.cpp index dae0dc056..f812d0ddb 100644 --- a/code/AssetLib/OpenGEX/OpenGEXExporter.cpp +++ b/code/AssetLib/OpenGEX/OpenGEXExporter.cpp @@ -48,7 +48,7 @@ namespace OpenGEX { OpenGEXExporter::OpenGEXExporter() = default; -OpenGEXExporter::~OpenGEXExporter() = default; + bool OpenGEXExporter::exportScene( const char * /*filename*/, const aiScene* /*pScene*/ ) { return true; diff --git a/code/AssetLib/OpenGEX/OpenGEXExporter.h b/code/AssetLib/OpenGEX/OpenGEXExporter.h index cc22c7d21..8e31b9ae3 100644 --- a/code/AssetLib/OpenGEX/OpenGEXExporter.h +++ b/code/AssetLib/OpenGEX/OpenGEXExporter.h @@ -55,7 +55,7 @@ namespace OpenGEX { class OpenGEXExporter { public: OpenGEXExporter(); - ~OpenGEXExporter(); + ~OpenGEXExporter() = default; bool exportScene( const char *filename, const aiScene* pScene ); }; diff --git a/code/AssetLib/Ply/PlyExporter.cpp b/code/AssetLib/Ply/PlyExporter.cpp index a98b83f67..9453e0d4d 100644 --- a/code/AssetLib/Ply/PlyExporter.cpp +++ b/code/AssetLib/Ply/PlyExporter.cpp @@ -245,9 +245,7 @@ PlyExporter::PlyExporter(const char* _filename, const aiScene* pScene, bool bina } // ------------------------------------------------------------------------------------------------ -PlyExporter::~PlyExporter() { - // empty -} +PlyExporter::~PlyExporter() = default; // ------------------------------------------------------------------------------------------------ void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components) diff --git a/code/AssetLib/Ply/PlyLoader.cpp b/code/AssetLib/Ply/PlyLoader.cpp index 6cf1a1c74..97ebca1fc 100644 --- a/code/AssetLib/Ply/PlyLoader.cpp +++ b/code/AssetLib/Ply/PlyLoader.cpp @@ -94,9 +94,7 @@ PLYImporter::PLYImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -PLYImporter::~PLYImporter() { - // empty -} +PLYImporter::~PLYImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Q3D/Q3DLoader.cpp b/code/AssetLib/Q3D/Q3DLoader.cpp index 0e12620dc..5ea4f00e1 100644 --- a/code/AssetLib/Q3D/Q3DLoader.cpp +++ b/code/AssetLib/Q3D/Q3DLoader.cpp @@ -72,15 +72,11 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -Q3DImporter::Q3DImporter() { - // empty -} +Q3DImporter::Q3DImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -Q3DImporter::~Q3DImporter() { - // empty -} +Q3DImporter::~Q3DImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Raw/RawLoader.cpp b/code/AssetLib/Raw/RawLoader.cpp index 83d8ce37f..41a8f14db 100644 --- a/code/AssetLib/Raw/RawLoader.cpp +++ b/code/AssetLib/Raw/RawLoader.cpp @@ -72,15 +72,11 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -RAWImporter::RAWImporter() { - // empty -} +RAWImporter::RAWImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -RAWImporter::~RAWImporter() { - // empty -} +RAWImporter::~RAWImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/SIB/SIBImporter.cpp b/code/AssetLib/SIB/SIBImporter.cpp index 7b66afa44..323a69a00 100644 --- a/code/AssetLib/SIB/SIBImporter.cpp +++ b/code/AssetLib/SIB/SIBImporter.cpp @@ -202,15 +202,11 @@ static aiString ReadString(StreamReaderLE *stream, uint32_t numWChars) { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -SIBImporter::SIBImporter() { - // empty -} +SIBImporter::SIBImporter() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -SIBImporter::~SIBImporter() { - // empty -} +SIBImporter::~SIBImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/SMD/SMDLoader.cpp b/code/AssetLib/SMD/SMDLoader.cpp index b4b6d3684..cbbc894ad 100644 --- a/code/AssetLib/SMD/SMDLoader.cpp +++ b/code/AssetLib/SMD/SMDLoader.cpp @@ -95,9 +95,7 @@ SMDImporter::SMDImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -SMDImporter::~SMDImporter() { - // empty -} +SMDImporter::~SMDImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. @@ -322,7 +320,7 @@ void SMDImporter::CreateOutputMeshes() { "to the vertex' parent node"); continue; } - aaiBones[pairval.first].push_back(TempWeightListEntry(iNum,pairval.second)); + aaiBones[pairval.first].emplace_back(iNum,pairval.second); fSum += pairval.second; } // ****************************************************************** @@ -350,8 +348,7 @@ void SMDImporter::CreateOutputMeshes() { } } } else { - aaiBones[face.avVertices[iVert].iParentNode].push_back( - TempWeightListEntry(iNum,1.0f-fSum)); + aaiBones[face.avVertices[iVert].iParentNode].emplace_back(iNum,1.0f-fSum); } } pcMesh->mFaces[iFace].mIndices[iVert] = iNum++; diff --git a/code/AssetLib/Terragen/TerragenLoader.cpp b/code/AssetLib/Terragen/TerragenLoader.cpp index c9c91db8f..dcf01461a 100644 --- a/code/AssetLib/Terragen/TerragenLoader.cpp +++ b/code/AssetLib/Terragen/TerragenLoader.cpp @@ -75,9 +75,7 @@ TerragenImporter::TerragenImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -TerragenImporter::~TerragenImporter() { - // empty -} +TerragenImporter::~TerragenImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/Unreal/UnrealLoader.cpp b/code/AssetLib/Unreal/UnrealLoader.cpp index 6166701d6..439ac2988 100644 --- a/code/AssetLib/Unreal/UnrealLoader.cpp +++ b/code/AssetLib/Unreal/UnrealLoader.cpp @@ -174,9 +174,7 @@ UnrealImporter::UnrealImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -UnrealImporter::~UnrealImporter() { - // empty -} +UnrealImporter::~UnrealImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/X/XFileImporter.cpp b/code/AssetLib/X/XFileImporter.cpp index e1070d826..83e9a74f2 100644 --- a/code/AssetLib/X/XFileImporter.cpp +++ b/code/AssetLib/X/XFileImporter.cpp @@ -82,9 +82,7 @@ XFileImporter::XFileImporter() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -XFileImporter::~XFileImporter() { - // empty -} +XFileImporter::~XFileImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/AssetLib/glTF/glTFImporter.cpp b/code/AssetLib/glTF/glTFImporter.cpp index 4ba54ac23..20ff7e7c8 100644 --- a/code/AssetLib/glTF/glTFImporter.cpp +++ b/code/AssetLib/glTF/glTFImporter.cpp @@ -84,9 +84,7 @@ glTFImporter::glTFImporter() : // empty } -glTFImporter::~glTFImporter() { - // empty -} +glTFImporter::~glTFImporter() = default; const aiImporterDesc *glTFImporter::GetInfo() const { return &desc; diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index da7591d52..3bfe49fba 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/code/AssetLib/glTF2/glTF2Exporter.cpp @@ -124,9 +124,7 @@ glTF2Exporter::glTF2Exporter(const char *filename, IOSystem *pIOSystem, const ai } } -glTF2Exporter::~glTF2Exporter() { - // empty -} +glTF2Exporter::~glTF2Exporter() = default; /* * Copy a 4x4 matrix from struct aiMatrix to typedef mat4. diff --git a/code/AssetLib/glTF2/glTF2Importer.cpp b/code/AssetLib/glTF2/glTF2Importer.cpp index 4788ecd97..947edc8d5 100644 --- a/code/AssetLib/glTF2/glTF2Importer.cpp +++ b/code/AssetLib/glTF2/glTF2Importer.cpp @@ -103,9 +103,7 @@ glTF2Importer::glTF2Importer() : // empty } -glTF2Importer::~glTF2Importer() { - // empty -} +glTF2Importer::~glTF2Importer() = default; const aiImporterDesc *glTF2Importer::GetInfo() const { return &desc; diff --git a/code/Common/BaseImporter.cpp b/code/Common/BaseImporter.cpp index 383300ef1..0266b50a1 100644 --- a/code/Common/BaseImporter.cpp +++ b/code/Common/BaseImporter.cpp @@ -70,9 +70,7 @@ BaseImporter::BaseImporter() AI_NO_EXCEPT // ------------------------------------------------------------------------------------------------ // Destructor, private as well -BaseImporter::~BaseImporter() { - // nothing to do here -} +BaseImporter::~BaseImporter() = default; void BaseImporter::UpdateImporterScale(Importer *pImp) { ai_assert(pImp != nullptr); diff --git a/code/Common/Exporter.cpp b/code/Common/Exporter.cpp index afcefc3a7..b25b37d57 100644 --- a/code/Common/Exporter.cpp +++ b/code/Common/Exporter.cpp @@ -585,19 +585,10 @@ void Exporter::UnregisterExporter(const char* id) { } // ------------------------------------------------------------------------------------------------ -ExportProperties::ExportProperties() { - // empty -} +ExportProperties::ExportProperties() = default; // ------------------------------------------------------------------------------------------------ -ExportProperties::ExportProperties(const ExportProperties &other) -: mIntProperties(other.mIntProperties) -, mFloatProperties(other.mFloatProperties) -, mStringProperties(other.mStringProperties) -, mMatrixProperties(other.mMatrixProperties) -, mCallbackProperties(other.mCallbackProperties){ - // empty -} +ExportProperties::ExportProperties(const ExportProperties &other) = default; bool ExportProperties::SetPropertyCallback(const char *szName, const std::function &f) { return SetGenericProperty>(mCallbackProperties, szName, f); diff --git a/code/Common/SpatialSort.cpp b/code/Common/SpatialSort.cpp index 676c5e202..a35ebb055 100644 --- a/code/Common/SpatialSort.cpp +++ b/code/Common/SpatialSort.cpp @@ -73,9 +73,7 @@ SpatialSort::SpatialSort() : // ------------------------------------------------------------------------------------------------ // Destructor -SpatialSort::~SpatialSort() { - // empty -} +SpatialSort::~SpatialSort() = default; // ------------------------------------------------------------------------------------------------ void SpatialSort::Fill(const aiVector3D *pPositions, unsigned int pNumPositions, diff --git a/code/Pbrt/PbrtExporter.cpp b/code/Pbrt/PbrtExporter.cpp index 6a26d3261..a9f8656a4 100644 --- a/code/Pbrt/PbrtExporter.cpp +++ b/code/Pbrt/PbrtExporter.cpp @@ -162,9 +162,7 @@ PbrtExporter::PbrtExporter( } // Destructor -PbrtExporter::~PbrtExporter() { - // Empty -} +PbrtExporter::~PbrtExporter() = default; void PbrtExporter::WriteMetaData() { mOutput << "#############################\n"; diff --git a/code/PostProcessing/ArmaturePopulate.cpp b/code/PostProcessing/ArmaturePopulate.cpp index 44f1e2e14..a05cd91e9 100644 --- a/code/PostProcessing/ArmaturePopulate.cpp +++ b/code/PostProcessing/ArmaturePopulate.cpp @@ -48,15 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { /// The default class constructor. -ArmaturePopulate::ArmaturePopulate() : - BaseProcess() { - // do nothing -} +ArmaturePopulate::ArmaturePopulate() = default; /// The class destructor. -ArmaturePopulate::~ArmaturePopulate() { - // do nothing -} +ArmaturePopulate::~ArmaturePopulate() = default; bool ArmaturePopulate::IsActive(unsigned int pFlags) const { return (pFlags & aiProcess_PopulateArmatureData) != 0; diff --git a/code/PostProcessing/CalcTangentsProcess.cpp b/code/PostProcessing/CalcTangentsProcess.cpp index b8847e473..efc457766 100644 --- a/code/PostProcessing/CalcTangentsProcess.cpp +++ b/code/PostProcessing/CalcTangentsProcess.cpp @@ -62,9 +62,7 @@ CalcTangentsProcess::CalcTangentsProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -CalcTangentsProcess::~CalcTangentsProcess() { - // nothing to do here -} +CalcTangentsProcess::~CalcTangentsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/ComputeUVMappingProcess.cpp b/code/PostProcessing/ComputeUVMappingProcess.cpp index ec8783041..237409f02 100644 --- a/code/PostProcessing/ComputeUVMappingProcess.cpp +++ b/code/PostProcessing/ComputeUVMappingProcess.cpp @@ -59,17 +59,11 @@ namespace { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -ComputeUVMappingProcess::ComputeUVMappingProcess() -{ - // nothing to do here -} +ComputeUVMappingProcess::ComputeUVMappingProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -ComputeUVMappingProcess::~ComputeUVMappingProcess() -{ - // nothing to do here -} +ComputeUVMappingProcess::~ComputeUVMappingProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/DeboneProcess.cpp b/code/PostProcessing/DeboneProcess.cpp index e8cfb16b0..2412eb9d8 100644 --- a/code/PostProcessing/DeboneProcess.cpp +++ b/code/PostProcessing/DeboneProcess.cpp @@ -66,10 +66,7 @@ DeboneProcess::DeboneProcess() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -DeboneProcess::~DeboneProcess() -{ - // nothing to do here -} +DeboneProcess::~DeboneProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/DropFaceNormalsProcess.cpp b/code/PostProcessing/DropFaceNormalsProcess.cpp index 0cf17f909..f85daa588 100644 --- a/code/PostProcessing/DropFaceNormalsProcess.cpp +++ b/code/PostProcessing/DropFaceNormalsProcess.cpp @@ -56,17 +56,11 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -DropFaceNormalsProcess::DropFaceNormalsProcess() -{ - // nothing to do here -} +DropFaceNormalsProcess::DropFaceNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -DropFaceNormalsProcess::~DropFaceNormalsProcess() -{ - // nothing to do here -} +DropFaceNormalsProcess::~DropFaceNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/EmbedTexturesProcess.cpp b/code/PostProcessing/EmbedTexturesProcess.cpp index 7ac4ddd4e..dc7e54ac1 100644 --- a/code/PostProcessing/EmbedTexturesProcess.cpp +++ b/code/PostProcessing/EmbedTexturesProcess.cpp @@ -49,14 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; -EmbedTexturesProcess::EmbedTexturesProcess() : - BaseProcess() { - // empty -} +EmbedTexturesProcess::EmbedTexturesProcess() = default; -EmbedTexturesProcess::~EmbedTexturesProcess() { - // empty -} +EmbedTexturesProcess::~EmbedTexturesProcess() = default; bool EmbedTexturesProcess::IsActive(unsigned int pFlags) const { return (pFlags & aiProcess_EmbedTextures) != 0; diff --git a/code/PostProcessing/FindDegenerates.cpp b/code/PostProcessing/FindDegenerates.cpp index 0bbf421d2..344979949 100644 --- a/code/PostProcessing/FindDegenerates.cpp +++ b/code/PostProcessing/FindDegenerates.cpp @@ -65,9 +65,7 @@ FindDegeneratesProcess::FindDegeneratesProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -FindDegeneratesProcess::~FindDegeneratesProcess() { - // nothing to do here -} +FindDegeneratesProcess::~FindDegeneratesProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/FindInvalidDataProcess.cpp b/code/PostProcessing/FindInvalidDataProcess.cpp index b42cbe9a0..c65208cbd 100644 --- a/code/PostProcessing/FindInvalidDataProcess.cpp +++ b/code/PostProcessing/FindInvalidDataProcess.cpp @@ -62,9 +62,7 @@ FindInvalidDataProcess::FindInvalidDataProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -FindInvalidDataProcess::~FindInvalidDataProcess() { - // nothing to do here -} +FindInvalidDataProcess::~FindInvalidDataProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/FixNormalsStep.cpp b/code/PostProcessing/FixNormalsStep.cpp index be0104214..3791bd35a 100644 --- a/code/PostProcessing/FixNormalsStep.cpp +++ b/code/PostProcessing/FixNormalsStep.cpp @@ -59,17 +59,11 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -FixInfacingNormalsProcess::FixInfacingNormalsProcess() -{ - // nothing to do here -} +FixInfacingNormalsProcess::FixInfacingNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -FixInfacingNormalsProcess::~FixInfacingNormalsProcess() -{ - // nothing to do here -} +FixInfacingNormalsProcess::~FixInfacingNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/GenBoundingBoxesProcess.cpp b/code/PostProcessing/GenBoundingBoxesProcess.cpp index 1c20b6f94..52a0861e5 100644 --- a/code/PostProcessing/GenBoundingBoxesProcess.cpp +++ b/code/PostProcessing/GenBoundingBoxesProcess.cpp @@ -48,14 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { -GenBoundingBoxesProcess::GenBoundingBoxesProcess() -: BaseProcess() { +GenBoundingBoxesProcess::GenBoundingBoxesProcess() = default; -} - -GenBoundingBoxesProcess::~GenBoundingBoxesProcess() { - // empty -} +GenBoundingBoxesProcess::~GenBoundingBoxesProcess() = default; bool GenBoundingBoxesProcess::IsActive(unsigned int pFlags) const { return 0 != ( pFlags & aiProcess_GenBoundingBoxes ); diff --git a/code/PostProcessing/GenFaceNormalsProcess.cpp b/code/PostProcessing/GenFaceNormalsProcess.cpp index 517dd3b63..f104b98b6 100644 --- a/code/PostProcessing/GenFaceNormalsProcess.cpp +++ b/code/PostProcessing/GenFaceNormalsProcess.cpp @@ -56,15 +56,11 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -GenFaceNormalsProcess::GenFaceNormalsProcess() { - // nothing to do here -} +GenFaceNormalsProcess::GenFaceNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -GenFaceNormalsProcess::~GenFaceNormalsProcess() { - // nothing to do here -} +GenFaceNormalsProcess::~GenFaceNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/GenVertexNormalsProcess.cpp b/code/PostProcessing/GenVertexNormalsProcess.cpp index 1a8afc597..0cb2bddb1 100644 --- a/code/PostProcessing/GenVertexNormalsProcess.cpp +++ b/code/PostProcessing/GenVertexNormalsProcess.cpp @@ -62,9 +62,7 @@ GenVertexNormalsProcess::GenVertexNormalsProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -GenVertexNormalsProcess::~GenVertexNormalsProcess() { - // nothing to do here -} +GenVertexNormalsProcess::~GenVertexNormalsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/ImproveCacheLocality.cpp b/code/PostProcessing/ImproveCacheLocality.cpp index 56bdfc447..197856171 100644 --- a/code/PostProcessing/ImproveCacheLocality.cpp +++ b/code/PostProcessing/ImproveCacheLocality.cpp @@ -70,9 +70,7 @@ ImproveCacheLocalityProcess::ImproveCacheLocalityProcess() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess() { - // nothing to do here -} +ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/JoinVerticesProcess.cpp b/code/PostProcessing/JoinVerticesProcess.cpp index 745ce1a5e..fa4811c29 100644 --- a/code/PostProcessing/JoinVerticesProcess.cpp +++ b/code/PostProcessing/JoinVerticesProcess.cpp @@ -57,15 +57,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -JoinVerticesProcess::JoinVerticesProcess() { - // nothing to do here -} +JoinVerticesProcess::JoinVerticesProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -JoinVerticesProcess::~JoinVerticesProcess() { - // nothing to do here -} +JoinVerticesProcess::~JoinVerticesProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/LimitBoneWeightsProcess.cpp b/code/PostProcessing/LimitBoneWeightsProcess.cpp index 63f6bf9f3..3192e07bc 100644 --- a/code/PostProcessing/LimitBoneWeightsProcess.cpp +++ b/code/PostProcessing/LimitBoneWeightsProcess.cpp @@ -62,10 +62,7 @@ LimitBoneWeightsProcess::LimitBoneWeightsProcess() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -LimitBoneWeightsProcess::~LimitBoneWeightsProcess() -{ - // nothing to do here -} +LimitBoneWeightsProcess::~LimitBoneWeightsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/MakeVerboseFormat.cpp b/code/PostProcessing/MakeVerboseFormat.cpp index 75e2a0f06..085979fe9 100644 --- a/code/PostProcessing/MakeVerboseFormat.cpp +++ b/code/PostProcessing/MakeVerboseFormat.cpp @@ -50,13 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; // ------------------------------------------------------------------------------------------------ -MakeVerboseFormatProcess::MakeVerboseFormatProcess() { - // nothing to do here -} +MakeVerboseFormatProcess::MakeVerboseFormatProcess() = default; // ------------------------------------------------------------------------------------------------ -MakeVerboseFormatProcess::~MakeVerboseFormatProcess() { - // nothing to do here -} +MakeVerboseFormatProcess::~MakeVerboseFormatProcess() = default; // ------------------------------------------------------------------------------------------------ // Executes the post processing step on the given imported data. void MakeVerboseFormatProcess::Execute(aiScene *pScene) { diff --git a/code/PostProcessing/OptimizeGraph.cpp b/code/PostProcessing/OptimizeGraph.cpp index ea44eb3c1..26b06e9b6 100644 --- a/code/PostProcessing/OptimizeGraph.cpp +++ b/code/PostProcessing/OptimizeGraph.cpp @@ -80,9 +80,7 @@ OptimizeGraphProcess::OptimizeGraphProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -OptimizeGraphProcess::~OptimizeGraphProcess() { - // empty -} +OptimizeGraphProcess::~OptimizeGraphProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/OptimizeMeshes.cpp b/code/PostProcessing/OptimizeMeshes.cpp index e624bb1cf..a8c01e2d7 100644 --- a/code/PostProcessing/OptimizeMeshes.cpp +++ b/code/PostProcessing/OptimizeMeshes.cpp @@ -71,9 +71,7 @@ OptimizeMeshesProcess::OptimizeMeshesProcess() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -OptimizeMeshesProcess::~OptimizeMeshesProcess() { - // empty -} +OptimizeMeshesProcess::~OptimizeMeshesProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/RemoveRedundantMaterials.cpp b/code/PostProcessing/RemoveRedundantMaterials.cpp index ac2fa9790..3c3cd59e0 100644 --- a/code/PostProcessing/RemoveRedundantMaterials.cpp +++ b/code/PostProcessing/RemoveRedundantMaterials.cpp @@ -64,10 +64,7 @@ RemoveRedundantMatsProcess::RemoveRedundantMatsProcess() // ------------------------------------------------------------------------------------------------ // Destructor, private as well -RemoveRedundantMatsProcess::~RemoveRedundantMatsProcess() -{ - // nothing to do here -} +RemoveRedundantMatsProcess::~RemoveRedundantMatsProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/ScaleProcess.cpp b/code/PostProcessing/ScaleProcess.cpp index 0090f8dd7..34f68539a 100644 --- a/code/PostProcessing/ScaleProcess.cpp +++ b/code/PostProcessing/ScaleProcess.cpp @@ -52,9 +52,7 @@ ScaleProcess::ScaleProcess() , mScale( AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT ) { } -ScaleProcess::~ScaleProcess() { - // empty -} +ScaleProcess::~ScaleProcess() = default; void ScaleProcess::setScale( ai_real scale ) { mScale = scale; diff --git a/code/PostProcessing/SortByPTypeProcess.cpp b/code/PostProcessing/SortByPTypeProcess.cpp index c9268093e..0c5d78350 100644 --- a/code/PostProcessing/SortByPTypeProcess.cpp +++ b/code/PostProcessing/SortByPTypeProcess.cpp @@ -61,9 +61,7 @@ SortByPTypeProcess::SortByPTypeProcess() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -SortByPTypeProcess::~SortByPTypeProcess() { - // nothing to do here -} +SortByPTypeProcess::~SortByPTypeProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/SplitByBoneCountProcess.cpp b/code/PostProcessing/SplitByBoneCountProcess.cpp index ace62ae90..5e052b76a 100644 --- a/code/PostProcessing/SplitByBoneCountProcess.cpp +++ b/code/PostProcessing/SplitByBoneCountProcess.cpp @@ -67,10 +67,7 @@ SplitByBoneCountProcess::SplitByBoneCountProcess() // ------------------------------------------------------------------------------------------------ // Destructor -SplitByBoneCountProcess::~SplitByBoneCountProcess() -{ - // nothing to do here -} +SplitByBoneCountProcess::~SplitByBoneCountProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag. diff --git a/code/PostProcessing/SplitLargeMeshes.cpp b/code/PostProcessing/SplitLargeMeshes.cpp index b25bbf06d..151ac4991 100644 --- a/code/PostProcessing/SplitLargeMeshes.cpp +++ b/code/PostProcessing/SplitLargeMeshes.cpp @@ -56,9 +56,7 @@ SplitLargeMeshesProcess_Triangle::SplitLargeMeshesProcess_Triangle() { } // ------------------------------------------------------------------------------------------------ -SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle() { - // nothing to do here -} +SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. @@ -332,9 +330,7 @@ SplitLargeMeshesProcess_Vertex::SplitLargeMeshesProcess_Vertex() { } // ------------------------------------------------------------------------------------------------ -SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex() { - // nothing to do here -} +SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/TextureTransform.cpp b/code/PostProcessing/TextureTransform.cpp index 653506ec6..2699863d1 100644 --- a/code/PostProcessing/TextureTransform.cpp +++ b/code/PostProcessing/TextureTransform.cpp @@ -64,10 +64,7 @@ TextureTransformStep::TextureTransformStep() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -TextureTransformStep::~TextureTransformStep() -{ - // nothing to do here -} +TextureTransformStep::~TextureTransformStep() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/code/PostProcessing/TriangulateProcess.cpp b/code/PostProcessing/TriangulateProcess.cpp index a18bf1c24..52e760361 100644 --- a/code/PostProcessing/TriangulateProcess.cpp +++ b/code/PostProcessing/TriangulateProcess.cpp @@ -159,17 +159,11 @@ namespace { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -TriangulateProcess::TriangulateProcess() -{ - // nothing to do here -} +TriangulateProcess::TriangulateProcess() = default; // ------------------------------------------------------------------------------------------------ // Destructor, private as well -TriangulateProcess::~TriangulateProcess() -{ - // nothing to do here -} +TriangulateProcess::~TriangulateProcess() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index e67a07515..b4531f96a 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -243,9 +243,7 @@ AI_FORCE_INLINE IOSystem::IOSystem() AI_NO_EXCEPT : } // ---------------------------------------------------------------------------- -AI_FORCE_INLINE IOSystem::~IOSystem() { - // empty -} +AI_FORCE_INLINE IOSystem::~IOSystem() = default; // ---------------------------------------------------------------------------- // For compatibility, the interface of some functions taking a std::string was diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp index 0ac74c609..3b17b200a 100644 --- a/include/assimp/LogStream.hpp +++ b/include/assimp/LogStream.hpp @@ -99,13 +99,9 @@ public: }; // !class LogStream -inline LogStream::LogStream() AI_NO_EXCEPT { - // empty -} +inline LogStream::LogStream() AI_NO_EXCEPT = default; -inline LogStream::~LogStream() { - // empty -} +inline LogStream::~LogStream() = default; } // Namespace Assimp diff --git a/include/assimp/aabb.h b/include/assimp/aabb.h index 51443bc20..fac77993d 100644 --- a/include/assimp/aabb.h +++ b/include/assimp/aabb.h @@ -73,9 +73,7 @@ struct aiAABB { } /// @brief The class destructor. - ~aiAABB() { - // empty - } + ~aiAABB() = default; #endif // __cplusplus }; diff --git a/tools/assimp_cmd/CompareDump.cpp b/tools/assimp_cmd/CompareDump.cpp index 49f680c24..4c2df2d9e 100644 --- a/tools/assimp_cmd/CompareDump.cpp +++ b/tools/assimp_cmd/CompareDump.cpp @@ -569,8 +569,7 @@ public: {} // - ~sliced_chunk_reader() { - } + ~sliced_chunk_reader() = default; public: