diff --git a/code/AssetLib/B3D/B3DImporter.cpp b/code/AssetLib/B3D/B3DImporter.cpp index b572a61e4..8cfa55cc4 100644 --- a/code/AssetLib/B3D/B3DImporter.cpp +++ b/code/AssetLib/B3D/B3DImporter.cpp @@ -88,9 +88,7 @@ void DeleteAllBarePointers(std::vector &x) { } } -B3DImporter::~B3DImporter() { - // empty -} +B3DImporter::~B3DImporter() = default; // ------------------------------------------------------------------------------------------------ bool B3DImporter::CanRead(const std::string &pFile, IOSystem * /*pIOHandler*/, bool /*checkSig*/) const { diff --git a/code/AssetLib/STL/STLLoader.cpp b/code/AssetLib/STL/STLLoader.cpp index cea448de1..2379ad619 100644 --- a/code/AssetLib/STL/STLLoader.cpp +++ b/code/AssetLib/STL/STLLoader.cpp @@ -134,9 +134,7 @@ STLImporter::STLImporter() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -STLImporter::~STLImporter() { - // empty -} +STLImporter::~STLImporter() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/Common/BaseProcess.cpp b/code/Common/BaseProcess.cpp index 32e9ad608..8ff7c98e9 100644 --- a/code/Common/BaseProcess.cpp +++ b/code/Common/BaseProcess.cpp @@ -59,9 +59,7 @@ BaseProcess::BaseProcess() AI_NO_EXCEPT // ------------------------------------------------------------------------------------------------ // Destructor, private as well -BaseProcess::~BaseProcess() { - // nothing to do here -} +BaseProcess::~BaseProcess() = default; // ------------------------------------------------------------------------------------------------ void BaseProcess::ExecuteOnScene(Importer *pImp) { diff --git a/code/Common/SGSpatialSort.cpp b/code/Common/SGSpatialSort.cpp index 5a830b4dd..0ef1853c0 100644 --- a/code/Common/SGSpatialSort.cpp +++ b/code/Common/SGSpatialSort.cpp @@ -59,10 +59,7 @@ SGSpatialSort::SGSpatialSort() } // ------------------------------------------------------------------------------------------------ // Destructor -SGSpatialSort::~SGSpatialSort() -{ - // nothing to do here, everything destructs automatically -} +SGSpatialSort::~SGSpatialSort() = default; // ------------------------------------------------------------------------------------------------ void SGSpatialSort::Add(const aiVector3D& vPosition, unsigned int index, unsigned int smoothingGroup) diff --git a/code/PostProcessing/PretransformVertices.cpp b/code/PostProcessing/PretransformVertices.cpp index ec7b8783e..9ac90d277 100644 --- a/code/PostProcessing/PretransformVertices.cpp +++ b/code/PostProcessing/PretransformVertices.cpp @@ -70,9 +70,7 @@ PretransformVertices::PretransformVertices() : // ------------------------------------------------------------------------------------------------ // Destructor, private as well -PretransformVertices::~PretransformVertices() { - // nothing to do here -} +PretransformVertices::~PretransformVertices() = default; // ------------------------------------------------------------------------------------------------ // Returns whether the processing step is present in the given flag field. diff --git a/test/unit/AbstractImportExportBase.cpp b/test/unit/AbstractImportExportBase.cpp index 31402f483..077a4d1f2 100644 --- a/test/unit/AbstractImportExportBase.cpp +++ b/test/unit/AbstractImportExportBase.cpp @@ -44,6 +44,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace ::Assimp; -AbstractImportExportBase::~AbstractImportExportBase() { - // empty -} +AbstractImportExportBase::~AbstractImportExportBase() = default; diff --git a/test/unit/ImportExport/utExporter.cpp b/test/unit/ImportExport/utExporter.cpp index 9c5ca1ce6..096a5c49d 100644 --- a/test/unit/ImportExport/utExporter.cpp +++ b/test/unit/ImportExport/utExporter.cpp @@ -55,9 +55,7 @@ public: // empty } - virtual ~TestProgressHandler() { - // empty - } + virtual ~TestProgressHandler() = default; bool Update(float percentage = -1.f) override { mPercentage = percentage; @@ -104,4 +102,4 @@ TEST_F(ExporterTest, ExporterIdTest) { EXPECT_EQ(nullptr, desc) << "More exporters than claimed"; } -#endif \ No newline at end of file +#endif diff --git a/test/unit/SceneDiffer.cpp b/test/unit/SceneDiffer.cpp index 0918530b7..a7132496a 100644 --- a/test/unit/SceneDiffer.cpp +++ b/test/unit/SceneDiffer.cpp @@ -53,9 +53,7 @@ SceneDiffer::SceneDiffer() // empty } -SceneDiffer::~SceneDiffer() { - // empty -} +SceneDiffer::~SceneDiffer() = default; bool SceneDiffer::isEqual( const aiScene *expected, const aiScene *toCompare ) { if ( expected == toCompare ) { diff --git a/test/unit/utBlendImportAreaLight.cpp b/test/unit/utBlendImportAreaLight.cpp index 53788743e..4a16e662c 100644 --- a/test/unit/utBlendImportAreaLight.cpp +++ b/test/unit/utBlendImportAreaLight.cpp @@ -69,7 +69,7 @@ TEST_F(BlendImportAreaLight, testImportLight) { std::vector> lightNames; for (size_t i = 0; i < pTest->mNumLights; i++) { - lightNames.push_back(std::make_pair(pTest->mLights[i]->mName.C_Str(), i)); + lightNames.emplace_back(pTest->mLights[i]->mName.C_Str(), i); } std::sort(lightNames.begin(), lightNames.end()); diff --git a/test/unit/utObjTools.cpp b/test/unit/utObjTools.cpp index 744e22630..f2e5304ad 100644 --- a/test/unit/utObjTools.cpp +++ b/test/unit/utObjTools.cpp @@ -55,9 +55,7 @@ public: // empty } - ~TestObjFileParser() { - // empty - } + ~TestObjFileParser() = default; void testCopyNextWord(char *pBuffer, size_t length) { copyNextWord(pBuffer, length); diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 31b92b0f0..a795a5472 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -55,9 +55,7 @@ public: // empty } - ~ConsoleProgressHandler() override { - // empty - } + ~ConsoleProgressHandler() override = default; bool Update(float percentage) override { std::cout << percentage * 100.0f << " %\n";