Explicitly default all empty dtors

pull/4703/head
Aaron Gokaslan 2022-08-25 11:19:26 -04:00
parent 46e571e497
commit 6fa21dcc6e
24 changed files with 51 additions and 100 deletions

View File

@ -88,7 +88,7 @@ BVHLoader::BVHLoader() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
BVHLoader::~BVHLoader() {}
BVHLoader::~BVHLoader() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -274,9 +274,7 @@ BlenderTessellatorP2T::BlenderTessellatorP2T( BlenderBMeshConverter& converter )
}
// ------------------------------------------------------------------------------------------------
BlenderTessellatorP2T::~BlenderTessellatorP2T( )
{
}
BlenderTessellatorP2T::~BlenderTessellatorP2T() = default;
// ------------------------------------------------------------------------------------------------
void BlenderTessellatorP2T::Tessellate( const MLoop* polyLoop, int vertexCount, const std::vector< MVert >& vertices )

View File

@ -85,8 +85,7 @@ CSMImporter::CSMImporter()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
CSMImporter::~CSMImporter()
{}
CSMImporter::~CSMImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -154,8 +154,7 @@ ColladaExporter::ColladaExporter(const aiScene *pScene, IOSystem *pIOSystem, con
// ------------------------------------------------------------------------------------------------
// Destructor
ColladaExporter::~ColladaExporter() {
}
ColladaExporter::~ColladaExporter() = default;
// ------------------------------------------------------------------------------------------------
// Starts writing the contents

View File

@ -66,11 +66,7 @@ Deformer::Deformer(uint64_t id, const Element& element, const Document& doc, con
}
// ------------------------------------------------------------------------------------------------
Deformer::~Deformer()
{
}
Deformer::~Deformer() = default;
// ------------------------------------------------------------------------------------------------
Cluster::Cluster(uint64_t id, const Element& element, const Document& doc, const std::string& name)
@ -119,11 +115,7 @@ Cluster::Cluster(uint64_t id, const Element& element, const Document& doc, const
// ------------------------------------------------------------------------------------------------
Cluster::~Cluster()
{
}
Cluster::~Cluster() = default;
// ------------------------------------------------------------------------------------------------
Skin::Skin(uint64_t id, const Element& element, const Document& doc, const std::string& name)
@ -152,10 +144,7 @@ Skin::Skin(uint64_t id, const Element& element, const Document& doc, const std::
// ------------------------------------------------------------------------------------------------
Skin::~Skin()
{
}
Skin::~Skin() = default;
// ------------------------------------------------------------------------------------------------
BlendShape::BlendShape(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: Deformer(id, element, doc, name)
@ -171,10 +160,7 @@ BlendShape::BlendShape(uint64_t id, const Element& element, const Document& doc,
}
}
// ------------------------------------------------------------------------------------------------
BlendShape::~BlendShape()
{
}
BlendShape::~BlendShape() = default;
// ------------------------------------------------------------------------------------------------
BlendShapeChannel::BlendShapeChannel(uint64_t id, const Element& element, const Document& doc, const std::string& name)
: Deformer(id, element, doc, name)
@ -199,10 +185,7 @@ BlendShapeChannel::BlendShapeChannel(uint64_t id, const Element& element, const
}
}
// ------------------------------------------------------------------------------------------------
BlendShapeChannel::~BlendShapeChannel()
{
}
BlendShapeChannel::~BlendShapeChannel() = default;
// ------------------------------------------------------------------------------------------------
}
}

View File

@ -60,26 +60,20 @@ namespace FBX {
using namespace Util;
// ------------------------------------------------------------------------------------------------
Property::Property()
{
}
Property::Property() = default;
// ------------------------------------------------------------------------------------------------
Property::~Property()
{
}
// ------------------------------------------------------------------------------------------------
Property::~Property() = default;
namespace {
namespace {
void checkTokenCount(const TokenList& tok, unsigned int expectedCount)
{
void checkTokenCount(const TokenList &tok, unsigned int expectedCount) {
ai_assert(expectedCount >= 2);
if (tok.size() < expectedCount) {
const std::string& s = ParseTokenAsString(*tok[1]);
const std::string &s = ParseTokenAsString(*tok[1]);
if (tok[1]->IsBinary()) {
throw DeadlyImportError("Not enough tokens for property of type ", s, " at offset ", tok[1]->Offset());
}
else {
} else {
throw DeadlyImportError("Not enough tokens for property of type ", s, " at line ", tok[1]->Line());
}
}

View File

@ -79,9 +79,7 @@ Token::Token(const char* sbegin, const char* send, TokenType type, unsigned int
}
// ------------------------------------------------------------------------------------------------
Token::~Token()
{
}
Token::~Token() = default;
namespace {

View File

@ -120,12 +120,11 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
IFCImporter::IFCImporter() {}
IFCImporter::IFCImporter() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
IFCImporter::~IFCImporter() {
}
IFCImporter::~IFCImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -79,7 +79,7 @@ IRRMeshImporter::IRRMeshImporter() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
IRRMeshImporter::~IRRMeshImporter() {}
IRRMeshImporter::~IRRMeshImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -102,8 +102,7 @@ MD2Importer::MD2Importer()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
MD2Importer::~MD2Importer()
{}
MD2Importer::~MD2Importer() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -345,7 +345,7 @@ MD3Importer::MD3Importer() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
MD3Importer::~MD3Importer() {}
MD3Importer::~MD3Importer() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -68,8 +68,7 @@ UniqueNameGenerator::UniqueNameGenerator(const char *template_name, const char *
separator_(separator) {
}
UniqueNameGenerator::~UniqueNameGenerator() {
}
UniqueNameGenerator::~UniqueNameGenerator() = default;
void UniqueNameGenerator::make_unique(std::vector<std::string> &names) {
struct DuplicateInfo {

View File

@ -86,8 +86,7 @@ MS3DImporter::MS3DImporter()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
MS3DImporter::~MS3DImporter()
{}
MS3DImporter::~MS3DImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
bool MS3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool /*checkSig*/) const

View File

@ -70,13 +70,11 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
NDOImporter::NDOImporter()
{}
NDOImporter::NDOImporter() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
NDOImporter::~NDOImporter()
{}
NDOImporter::~NDOImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -73,11 +73,11 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
NFFImporter::NFFImporter() {}
NFFImporter::NFFImporter() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
NFFImporter::~NFFImporter() {}
NFFImporter::~NFFImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -73,13 +73,11 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
OFFImporter::OFFImporter()
{}
OFFImporter::OFFImporter() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
OFFImporter::~OFFImporter()
{}
OFFImporter::~OFFImporter() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.

View File

@ -97,8 +97,7 @@ ObjFileParser::ObjFileParser(IOStreamBuffer<char> &streamBuffer, const std::stri
parseFile(streamBuffer);
}
ObjFileParser::~ObjFileParser() {
}
ObjFileParser::~ObjFileParser() = default;
void ObjFileParser::setBuffer(std::vector<char> &buffer) {
m_DataIt = buffer.begin();

View File

@ -272,8 +272,7 @@ std::set<uint16_t> IVertexData::ReferencedBonesByWeights() const {
// VertexData
VertexData::VertexData() {
}
VertexData::VertexData() = default;
VertexData::~VertexData() {
Reset();
@ -310,8 +309,7 @@ VertexElement *VertexData::GetVertexElement(VertexElement::Semantic semantic, ui
// VertexDataXml
VertexDataXml::VertexDataXml() {
}
VertexDataXml::VertexDataXml() = default;
bool VertexDataXml::HasPositions() const {
return !positions.empty();

View File

@ -46,11 +46,9 @@ namespace OpenGEX {
#ifndef ASSIMP_BUILD_NO_OPENGEX_EXPORTER
OpenGEXExporter::OpenGEXExporter() {
}
OpenGEXExporter::OpenGEXExporter() = default;
OpenGEXExporter::~OpenGEXExporter() {
}
OpenGEXExporter::~OpenGEXExporter() = default;
bool OpenGEXExporter::exportScene( const char * /*filename*/, const aiScene* /*pScene*/ ) {
return true;

View File

@ -279,8 +279,7 @@ ZipFile::ZipFile(std::string &filename, size_t size) :
m_Buffer = std::unique_ptr<uint8_t[]>(new uint8_t[m_Size]);
}
ZipFile::~ZipFile() {
}
ZipFile::~ZipFile() = default;
size_t ZipFile::Read(void *pvBuffer, size_t pSize, size_t pCount) {
// Should be impossible

View File

@ -81,16 +81,11 @@ void flipUVs(aiMeshType *pMesh) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
MakeLeftHandedProcess::MakeLeftHandedProcess() :
BaseProcess() {
// empty
}
MakeLeftHandedProcess::MakeLeftHandedProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
MakeLeftHandedProcess::~MakeLeftHandedProcess() {
// empty
}
MakeLeftHandedProcess::~MakeLeftHandedProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@ -250,11 +245,11 @@ void MakeLeftHandedProcess::ProcessAnimation(aiNodeAnim *pAnim) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FlipUVsProcess::FlipUVsProcess() {}
FlipUVsProcess::FlipUVsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FlipUVsProcess::~FlipUVsProcess() {}
FlipUVsProcess::~FlipUVsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@ -312,11 +307,11 @@ void FlipUVsProcess::ProcessMesh(aiMesh *pMesh) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FlipWindingOrderProcess::FlipWindingOrderProcess() {}
FlipWindingOrderProcess::FlipWindingOrderProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FlipWindingOrderProcess::~FlipWindingOrderProcess() {}
FlipWindingOrderProcess::~FlipWindingOrderProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@ -60,8 +60,7 @@ FindInstancesProcess::FindInstancesProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FindInstancesProcess::~FindInstancesProcess()
{}
FindInstancesProcess::~FindInstancesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@ -58,7 +58,7 @@ RemoveVCProcess::RemoveVCProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
RemoveVCProcess::~RemoveVCProcess() {}
RemoveVCProcess::~RemoveVCProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@ -65,7 +65,7 @@ ValidateDSProcess::ValidateDSProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
ValidateDSProcess::~ValidateDSProcess() {}
ValidateDSProcess::~ValidateDSProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.