Tidy Up Constructors and Destructors
This commit does not add or remove c’tors or d’tors, so it is *not* ABI-breaking. If a c’tor/d’tor does nothing else than the default behavior, this commit replaces it with “= default”. If an initializer list entry does nothing else than the default behavior, this commit removes it. First and foremost, remove default c’tor calls of base classes (always called by the compiler if no other base c’tor is explicitly called) and c’tor calls of members with complex types (e.g. “std::vector”). In a few instances, user-defined copy c’tors / move c’tors / assignment operators / move assignment operators were replaced with “= default”, too. I only did this if I had a clear understanding of what’s going on.pull/4888/head
parent
70edec0efb
commit
36305cf987
|
@ -322,7 +322,6 @@ struct Texture {
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
Texture() AI_NO_EXCEPT
|
Texture() AI_NO_EXCEPT
|
||||||
: mTextureBlend(0.0f),
|
: mTextureBlend(0.0f),
|
||||||
mMapName(),
|
|
||||||
mOffsetU(0.0),
|
mOffsetU(0.0),
|
||||||
mOffsetV(0.0),
|
mOffsetV(0.0),
|
||||||
mScaleU(1.0),
|
mScaleU(1.0),
|
||||||
|
@ -334,51 +333,11 @@ struct Texture {
|
||||||
mTextureBlend = get_qnan();
|
mTextureBlend = get_qnan();
|
||||||
}
|
}
|
||||||
|
|
||||||
Texture(const Texture &other) :
|
Texture(const Texture &other) = default;
|
||||||
mTextureBlend(other.mTextureBlend),
|
|
||||||
mMapName(other.mMapName),
|
|
||||||
mOffsetU(other.mOffsetU),
|
|
||||||
mOffsetV(other.mOffsetV),
|
|
||||||
mScaleU(other.mScaleU),
|
|
||||||
mScaleV(other.mScaleV),
|
|
||||||
mRotation(other.mRotation),
|
|
||||||
mMapMode(other.mMapMode),
|
|
||||||
bPrivate(other.bPrivate),
|
|
||||||
iUVSrc(other.iUVSrc) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
Texture(Texture &&other) AI_NO_EXCEPT : mTextureBlend(other.mTextureBlend),
|
Texture(Texture &&other) AI_NO_EXCEPT = default;
|
||||||
mMapName(std::move(other.mMapName)),
|
|
||||||
mOffsetU(other.mOffsetU),
|
|
||||||
mOffsetV(other.mOffsetV),
|
|
||||||
mScaleU(other.mScaleU),
|
|
||||||
mScaleV(other.mScaleV),
|
|
||||||
mRotation(other.mRotation),
|
|
||||||
mMapMode(other.mMapMode),
|
|
||||||
bPrivate(other.bPrivate),
|
|
||||||
iUVSrc(other.iUVSrc) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
Texture &operator=(Texture &&other) AI_NO_EXCEPT {
|
Texture &operator=(Texture &&other) AI_NO_EXCEPT = default;
|
||||||
if (this == &other) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
mTextureBlend = other.mTextureBlend;
|
|
||||||
mMapName = std::move(other.mMapName);
|
|
||||||
mOffsetU = other.mOffsetU;
|
|
||||||
mOffsetV = other.mOffsetV;
|
|
||||||
mScaleU = other.mScaleU;
|
|
||||||
mScaleV = other.mScaleV;
|
|
||||||
mRotation = other.mRotation;
|
|
||||||
mMapMode = other.mMapMode;
|
|
||||||
bPrivate = other.bPrivate;
|
|
||||||
iUVSrc = other.iUVSrc;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Specifies the blend factor for the texture
|
//! Specifies the blend factor for the texture
|
||||||
ai_real mTextureBlend;
|
ai_real mTextureBlend;
|
||||||
|
@ -436,83 +395,13 @@ struct Material {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
Material(const Material &other) :
|
Material(const Material &other) = default;
|
||||||
mName(other.mName),
|
|
||||||
mDiffuse(other.mDiffuse),
|
|
||||||
mSpecularExponent(other.mSpecularExponent),
|
|
||||||
mShininessStrength(other.mShininessStrength),
|
|
||||||
mSpecular(other.mSpecular),
|
|
||||||
mAmbient(other.mAmbient),
|
|
||||||
mShading(other.mShading),
|
|
||||||
mTransparency(other.mTransparency),
|
|
||||||
sTexDiffuse(other.sTexDiffuse),
|
|
||||||
sTexOpacity(other.sTexOpacity),
|
|
||||||
sTexSpecular(other.sTexSpecular),
|
|
||||||
sTexReflective(other.sTexReflective),
|
|
||||||
sTexBump(other.sTexBump),
|
|
||||||
sTexEmissive(other.sTexEmissive),
|
|
||||||
sTexShininess(other.sTexShininess),
|
|
||||||
mBumpHeight(other.mBumpHeight),
|
|
||||||
mEmissive(other.mEmissive),
|
|
||||||
sTexAmbient(other.sTexAmbient),
|
|
||||||
mTwoSided(other.mTwoSided) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
|
Material(Material &&other) AI_NO_EXCEPT = default;
|
||||||
Material(Material &&other) AI_NO_EXCEPT : mName(std::move(other.mName)),
|
|
||||||
mDiffuse(other.mDiffuse),
|
|
||||||
mSpecularExponent(other.mSpecularExponent),
|
|
||||||
mShininessStrength(other.mShininessStrength),
|
|
||||||
mSpecular(other.mSpecular),
|
|
||||||
mAmbient(other.mAmbient),
|
|
||||||
mShading(other.mShading),
|
|
||||||
mTransparency(other.mTransparency),
|
|
||||||
sTexDiffuse(std::move(other.sTexDiffuse)),
|
|
||||||
sTexOpacity(std::move(other.sTexOpacity)),
|
|
||||||
sTexSpecular(std::move(other.sTexSpecular)),
|
|
||||||
sTexReflective(std::move(other.sTexReflective)),
|
|
||||||
sTexBump(std::move(other.sTexBump)),
|
|
||||||
sTexEmissive(std::move(other.sTexEmissive)),
|
|
||||||
sTexShininess(std::move(other.sTexShininess)),
|
|
||||||
mBumpHeight(other.mBumpHeight),
|
|
||||||
mEmissive(other.mEmissive),
|
|
||||||
sTexAmbient(std::move(other.sTexAmbient)),
|
|
||||||
mTwoSided(other.mTwoSided) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
Material &operator=(Material &&other) AI_NO_EXCEPT {
|
Material &operator=(Material &&other) AI_NO_EXCEPT = default;
|
||||||
if (this == &other) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
mName = std::move(other.mName);
|
virtual ~Material() = default;
|
||||||
mDiffuse = other.mDiffuse;
|
|
||||||
mSpecularExponent = other.mSpecularExponent;
|
|
||||||
mShininessStrength = other.mShininessStrength,
|
|
||||||
mSpecular = other.mSpecular;
|
|
||||||
mAmbient = other.mAmbient;
|
|
||||||
mShading = other.mShading;
|
|
||||||
mTransparency = other.mTransparency;
|
|
||||||
sTexDiffuse = std::move(other.sTexDiffuse);
|
|
||||||
sTexOpacity = std::move(other.sTexOpacity);
|
|
||||||
sTexSpecular = std::move(other.sTexSpecular);
|
|
||||||
sTexReflective = std::move(other.sTexReflective);
|
|
||||||
sTexBump = std::move(other.sTexBump);
|
|
||||||
sTexEmissive = std::move(other.sTexEmissive);
|
|
||||||
sTexShininess = std::move(other.sTexShininess);
|
|
||||||
mBumpHeight = other.mBumpHeight;
|
|
||||||
mEmissive = other.mEmissive;
|
|
||||||
sTexAmbient = std::move(other.sTexAmbient);
|
|
||||||
mTwoSided = other.mTwoSided;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Material() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Name of the material
|
//! Name of the material
|
||||||
std::string mName;
|
std::string mName;
|
||||||
|
|
|
@ -69,9 +69,7 @@ public:
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~Resource() {
|
virtual ~Resource() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ResourceType getType() const {
|
virtual ResourceType getType() const {
|
||||||
return ResourceType::RT_Unknown;
|
return ResourceType::RT_Unknown;
|
||||||
|
|
|
@ -83,7 +83,7 @@ void ExportScene3MF(const char *pFile, IOSystem *pIOSystem, const aiScene *pScen
|
||||||
namespace D3MF {
|
namespace D3MF {
|
||||||
|
|
||||||
D3MFExporter::D3MFExporter(const char *pFile, const aiScene *pScene) :
|
D3MFExporter::D3MFExporter(const char *pFile, const aiScene *pScene) :
|
||||||
mArchiveName(pFile), m_zipArchive(nullptr), mScene(pScene), mModelOutput(), mRelOutput(), mContentOutput(), mBuildItems(), mRelations() {
|
mArchiveName(pFile), m_zipArchive(nullptr), mScene(pScene) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,11 +83,7 @@ void AMFImporter::Clear() {
|
||||||
|
|
||||||
AMFImporter::AMFImporter() AI_NO_EXCEPT :
|
AMFImporter::AMFImporter() AI_NO_EXCEPT :
|
||||||
mNodeElement_Cur(nullptr),
|
mNodeElement_Cur(nullptr),
|
||||||
mXmlParser(nullptr),
|
mXmlParser(nullptr) {
|
||||||
mUnit(),
|
|
||||||
mVersion(),
|
|
||||||
mMaterial_Converted(),
|
|
||||||
mTexture_Converted() {
|
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,9 +88,7 @@ public:
|
||||||
std::list<AMFNodeElementBase *> Child; ///< Child elements.
|
std::list<AMFNodeElementBase *> Child; ///< Child elements.
|
||||||
|
|
||||||
public: /// Destructor, virtual..
|
public: /// Destructor, virtual..
|
||||||
virtual ~AMFNodeElementBase() {
|
virtual ~AMFNodeElementBase() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Disabled copy constructor and co.
|
/// Disabled copy constructor and co.
|
||||||
AMFNodeElementBase(const AMFNodeElementBase &pNodeElement) = delete;
|
AMFNodeElementBase(const AMFNodeElementBase &pNodeElement) = delete;
|
||||||
|
@ -103,7 +101,7 @@ protected:
|
||||||
/// \param [in] pType - element type.
|
/// \param [in] pType - element type.
|
||||||
/// \param [in] pParent - parent element.
|
/// \param [in] pParent - parent element.
|
||||||
AMFNodeElementBase(const EType pType, AMFNodeElementBase *pParent) :
|
AMFNodeElementBase(const EType pType, AMFNodeElementBase *pParent) :
|
||||||
Type(pType), ID(), Parent(pParent), Child() {
|
Type(pType), Parent(pParent) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
}; // class IAMFImporter_NodeElement
|
}; // class IAMFImporter_NodeElement
|
||||||
|
@ -174,7 +172,7 @@ struct AMFColor : public AMFNodeElementBase {
|
||||||
/// @brief Constructor.
|
/// @brief Constructor.
|
||||||
/// @param [in] pParent - pointer to parent node.
|
/// @param [in] pParent - pointer to parent node.
|
||||||
AMFColor(AMFNodeElementBase *pParent) :
|
AMFColor(AMFNodeElementBase *pParent) :
|
||||||
AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color(), Profile() {
|
AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color() {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -270,7 +268,7 @@ struct AMFTexMap : public AMFNodeElementBase {
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
/// \param [in] pParent - pointer to parent node.
|
/// \param [in] pParent - pointer to parent node.
|
||||||
AMFTexMap(AMFNodeElementBase *pParent) :
|
AMFTexMap(AMFNodeElementBase *pParent) :
|
||||||
AMFNodeElementBase(ENET_TexMap, pParent), TextureCoordinate{}, TextureID_R(), TextureID_G(), TextureID_B(), TextureID_A() {
|
AMFNodeElementBase(ENET_TexMap, pParent), TextureCoordinate{} {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -106,9 +106,7 @@ struct ElemBase {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ElemBase() {
|
virtual ~ElemBase() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Type name of the element. The type
|
/** Type name of the element. The type
|
||||||
* string points is the `c_str` of the `name` attribute of the
|
* string points is the `c_str` of the `name` attribute of the
|
||||||
|
|
|
@ -62,9 +62,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* The class destructor, virtual.
|
* The class destructor, virtual.
|
||||||
*/
|
*/
|
||||||
virtual ~BlenderModifier() {
|
virtual ~BlenderModifier() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -182,7 +182,7 @@ struct MVert : ElemBase {
|
||||||
int bweight;
|
int bweight;
|
||||||
|
|
||||||
MVert() :
|
MVert() :
|
||||||
ElemBase(), flag(0), mat_nr(0), bweight(0) {}
|
flag(0), mat_nr(0), bweight(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
@ -417,7 +417,6 @@ struct CustomDataLayer : ElemBase {
|
||||||
std::shared_ptr<ElemBase> data; // must be converted to real type according type member
|
std::shared_ptr<ElemBase> data; // must be converted to real type according type member
|
||||||
|
|
||||||
CustomDataLayer() :
|
CustomDataLayer() :
|
||||||
ElemBase(),
|
|
||||||
type(0),
|
type(0),
|
||||||
offset(0),
|
offset(0),
|
||||||
flag(0),
|
flag(0),
|
||||||
|
@ -729,7 +728,7 @@ struct Object : ElemBase {
|
||||||
ListBase modifiers;
|
ListBase modifiers;
|
||||||
|
|
||||||
Object() :
|
Object() :
|
||||||
ElemBase(), type(Type_EMPTY), parent(nullptr), track(), proxy(), proxy_from(), data() {
|
type(Type_EMPTY), parent(nullptr) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -741,8 +740,7 @@ struct Base : ElemBase {
|
||||||
std::shared_ptr<Object> object WARN;
|
std::shared_ptr<Object> object WARN;
|
||||||
|
|
||||||
Base() :
|
Base() :
|
||||||
ElemBase(), prev(nullptr), next(), object() {
|
prev(nullptr) {
|
||||||
// empty
|
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -758,10 +756,7 @@ struct Scene : ElemBase {
|
||||||
|
|
||||||
ListBase base;
|
ListBase base;
|
||||||
|
|
||||||
Scene() :
|
Scene() = default;
|
||||||
ElemBase(), camera(), world(), basact(), master_collection() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
@ -791,10 +786,7 @@ struct Image : ElemBase {
|
||||||
|
|
||||||
short gen_x, gen_y, gen_type;
|
short gen_x, gen_y, gen_type;
|
||||||
|
|
||||||
Image() :
|
Image() = default;
|
||||||
ElemBase() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
@ -884,7 +876,7 @@ struct Tex : ElemBase {
|
||||||
//char use_nodes;
|
//char use_nodes;
|
||||||
|
|
||||||
Tex() :
|
Tex() :
|
||||||
ElemBase(), imaflag(ImageFlags_INTERPOL), type(Type_CLOUDS), ima() {
|
imaflag(ImageFlags_INTERPOL), type(Type_CLOUDS) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -976,10 +968,7 @@ struct MTex : ElemBase {
|
||||||
//float shadowfac;
|
//float shadowfac;
|
||||||
//float zenupfac, zendownfac, blendfac;
|
//float zenupfac, zendownfac, blendfac;
|
||||||
|
|
||||||
MTex() :
|
MTex() = default;
|
||||||
ElemBase() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Blender
|
} // namespace Blender
|
||||||
|
|
|
@ -81,9 +81,7 @@ BlenderTessellatorGL::BlenderTessellatorGL( BlenderBMeshConverter& converter ):
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
BlenderTessellatorGL::~BlenderTessellatorGL( )
|
BlenderTessellatorGL::~BlenderTessellatorGL() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderTessellatorGL::Tessellate( const MLoop* polyLoop, int vertexCount, const std::vector< MVert >& vertices )
|
void BlenderTessellatorGL::Tessellate( const MLoop* polyLoop, int vertexCount, const std::vector< MVert >& vertices )
|
||||||
|
|
|
@ -106,15 +106,10 @@ static const aiImporterDesc desc = {
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
C4DImporter::C4DImporter()
|
C4DImporter::C4DImporter() = default;
|
||||||
: BaseImporter() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
C4DImporter::~C4DImporter() {
|
C4DImporter::~C4DImporter() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool C4DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const {
|
bool C4DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const {
|
||||||
|
|
|
@ -92,15 +92,6 @@ inline void AddNodeMetaData(aiNode *node, const std::string &key, const T &value
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
ColladaLoader::ColladaLoader() :
|
ColladaLoader::ColladaLoader() :
|
||||||
mFileName(),
|
|
||||||
mMeshIndexByID(),
|
|
||||||
mMaterialIndexByName(),
|
|
||||||
mMeshes(),
|
|
||||||
newMats(),
|
|
||||||
mCameras(),
|
|
||||||
mLights(),
|
|
||||||
mTextures(),
|
|
||||||
mAnims(),
|
|
||||||
noSkeletonMesh(false),
|
noSkeletonMesh(false),
|
||||||
removeEmptyBones(false),
|
removeEmptyBones(false),
|
||||||
ignoreUpDirection(false),
|
ignoreUpDirection(false),
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
LineReader(StreamReaderLE& reader)
|
LineReader(StreamReaderLE& reader)
|
||||||
: splitter(reader,false,true)
|
: splitter(reader,false,true)
|
||||||
, groupcode( 0 )
|
, groupcode( 0 )
|
||||||
, value()
|
|
||||||
, end() {
|
, end() {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -186,8 +185,7 @@ struct InsertBlock {
|
||||||
InsertBlock()
|
InsertBlock()
|
||||||
: pos()
|
: pos()
|
||||||
, scale(1.f,1.f,1.f)
|
, scale(1.f,1.f,1.f)
|
||||||
, angle()
|
, angle() {
|
||||||
, name() {
|
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,6 @@ public: // constructors
|
||||||
/// The class constructor with the name.
|
/// The class constructor with the name.
|
||||||
Node(const std::string& n)
|
Node(const std::string& n)
|
||||||
: name(n)
|
: name(n)
|
||||||
, properties()
|
|
||||||
, children()
|
|
||||||
, force_has_children( false ) {
|
, force_has_children( false ) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -87,8 +85,6 @@ public: // constructors
|
||||||
template <typename... More>
|
template <typename... More>
|
||||||
Node(const std::string& n, More&&... more)
|
Node(const std::string& n, More&&... more)
|
||||||
: name(n)
|
: name(n)
|
||||||
, properties()
|
|
||||||
, children()
|
|
||||||
, force_has_children(false) {
|
, force_has_children(false) {
|
||||||
AddProperties(std::forward<More>(more)...);
|
AddProperties(std::forward<More>(more)...);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,10 +90,7 @@ static const aiImporterDesc desc = {
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by #Importer
|
// Constructor to be privately used by #Importer
|
||||||
FBXImporter::FBXImporter() :
|
FBXImporter::FBXImporter() = default;
|
||||||
mSettings() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
|
|
|
@ -71,11 +71,7 @@ static const aiImporterDesc desc = {
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
IRRMeshImporter::IRRMeshImporter() :
|
IRRMeshImporter::IRRMeshImporter() = default;
|
||||||
BaseImporter(),
|
|
||||||
IrrlichtBase() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor, private as well
|
// Destructor, private as well
|
||||||
|
|
|
@ -63,9 +63,7 @@ protected:
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
~IrrlichtBase() {
|
~IrrlichtBase() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @brief Data structure for a simple name-value property
|
/** @brief Data structure for a simple name-value property
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -65,7 +65,7 @@ class M3DImporter : public BaseImporter {
|
||||||
public:
|
public:
|
||||||
/// \brief Default constructor
|
/// \brief Default constructor
|
||||||
M3DImporter();
|
M3DImporter();
|
||||||
~M3DImporter() override {}
|
~M3DImporter() override = default;
|
||||||
|
|
||||||
/// \brief Returns whether the class can handle the format of the given file.
|
/// \brief Returns whether the class can handle the format of the given file.
|
||||||
/// \remark See BaseImporter::CanRead() for details.
|
/// \remark See BaseImporter::CanRead() for details.
|
||||||
|
|
|
@ -261,7 +261,6 @@ OpenGEXImporter::RefInfo::RefInfo(aiNode *node, Type type, std::vector<std::stri
|
||||||
OpenGEXImporter::OpenGEXImporter() :
|
OpenGEXImporter::OpenGEXImporter() :
|
||||||
m_root(nullptr),
|
m_root(nullptr),
|
||||||
m_nodeChildMap(),
|
m_nodeChildMap(),
|
||||||
m_meshCache(),
|
|
||||||
m_mesh2refMap(),
|
m_mesh2refMap(),
|
||||||
m_material2refMap(),
|
m_material2refMap(),
|
||||||
m_ctx(nullptr),
|
m_ctx(nullptr),
|
||||||
|
|
|
@ -296,9 +296,7 @@ class PropertyInstance
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
PropertyInstance() AI_NO_EXCEPT {
|
PropertyInstance() AI_NO_EXCEPT = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
union ValueUnion
|
union ValueUnion
|
||||||
{
|
{
|
||||||
|
@ -359,10 +357,7 @@ public:
|
||||||
class ElementInstance {
|
class ElementInstance {
|
||||||
public:
|
public:
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
ElementInstance() AI_NO_EXCEPT
|
ElementInstance() AI_NO_EXCEPT = default;
|
||||||
: alProperties() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
//! List of all parsed properties
|
//! List of all parsed properties
|
||||||
std::vector< PropertyInstance > alProperties;
|
std::vector< PropertyInstance > alProperties;
|
||||||
|
@ -386,10 +381,7 @@ class ElementInstanceList
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
ElementInstanceList() AI_NO_EXCEPT
|
ElementInstanceList() AI_NO_EXCEPT = default;
|
||||||
: alInstances() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
//! List of all element instances
|
//! List of all element instances
|
||||||
std::vector< ElementInstance > alInstances;
|
std::vector< ElementInstance > alInstances;
|
||||||
|
@ -413,11 +405,7 @@ class DOM
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Default constructor
|
//! Default constructor
|
||||||
DOM() AI_NO_EXCEPT
|
DOM() AI_NO_EXCEPT = default;
|
||||||
: alElements()
|
|
||||||
, alElementData() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//! Contains all elements of the file format
|
//! Contains all elements of the file format
|
||||||
|
|
|
@ -169,19 +169,7 @@ struct Q3BSPModel {
|
||||||
std::vector<char> m_EntityData;
|
std::vector<char> m_EntityData;
|
||||||
std::string m_ModelName;
|
std::string m_ModelName;
|
||||||
|
|
||||||
Q3BSPModel() :
|
Q3BSPModel() = default;
|
||||||
m_Data(),
|
|
||||||
m_Lumps(),
|
|
||||||
m_Vertices(),
|
|
||||||
m_Faces(),
|
|
||||||
m_Indices(),
|
|
||||||
m_Textures(),
|
|
||||||
m_Lightmaps(),
|
|
||||||
m_EntityData(),
|
|
||||||
m_ModelName()
|
|
||||||
{
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
~Q3BSPModel() {
|
~Q3BSPModel() {
|
||||||
for ( unsigned int i=0; i<m_Lumps.size(); i++ ) {
|
for ( unsigned int i=0; i<m_Lumps.size(); i++ ) {
|
||||||
|
|
|
@ -139,7 +139,7 @@ static void normalizePathName(const std::string &rPath, std::string &normalizedP
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor.
|
// Constructor.
|
||||||
Q3BSPFileImporter::Q3BSPFileImporter() :
|
Q3BSPFileImporter::Q3BSPFileImporter() :
|
||||||
m_pCurrentMesh(nullptr), m_pCurrentFace(nullptr), m_MaterialLookupMap(), mTextures() {
|
m_pCurrentMesh(nullptr), m_pCurrentFace(nullptr) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,6 @@ static const aiImporterDesc desc = {
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
SMDImporter::SMDImporter() :
|
SMDImporter::SMDImporter() :
|
||||||
configFrameID(),
|
configFrameID(),
|
||||||
mBuffer(),
|
|
||||||
pScene( nullptr ),
|
pScene( nullptr ),
|
||||||
iFileSize( 0 ),
|
iFileSize( 0 ),
|
||||||
iSmallestFrame( INT_MAX ),
|
iSmallestFrame( INT_MAX ),
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct Vertex {
|
||||||
*/
|
*/
|
||||||
struct Face {
|
struct Face {
|
||||||
Face() AI_NO_EXCEPT :
|
Face() AI_NO_EXCEPT :
|
||||||
iTexture(0x0), avVertices{} {
|
iTexture(0x0) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct TexEntry {
|
||||||
bool mIsNormalMap; // true if the texname was specified in a NormalmapFilename tag
|
bool mIsNormalMap; // true if the texname was specified in a NormalmapFilename tag
|
||||||
|
|
||||||
TexEntry() AI_NO_EXCEPT :
|
TexEntry() AI_NO_EXCEPT :
|
||||||
mName(),
|
|
||||||
mIsNormalMap(false) {
|
mIsNormalMap(false) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
@ -128,17 +127,8 @@ struct Mesh {
|
||||||
|
|
||||||
explicit Mesh(const std::string &pName = std::string()) AI_NO_EXCEPT
|
explicit Mesh(const std::string &pName = std::string()) AI_NO_EXCEPT
|
||||||
: mName(pName),
|
: mName(pName),
|
||||||
mPositions(),
|
|
||||||
mPosFaces(),
|
|
||||||
mNormals(),
|
|
||||||
mNormFaces(),
|
|
||||||
mNumTextures(0),
|
mNumTextures(0),
|
||||||
mTexCoords{},
|
mNumColorSets(0) {
|
||||||
mNumColorSets(0),
|
|
||||||
mColors{},
|
|
||||||
mFaceMaterials(),
|
|
||||||
mMaterials(),
|
|
||||||
mBones() {
|
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -152,15 +142,12 @@ struct Node {
|
||||||
std::vector<Mesh *> mMeshes;
|
std::vector<Mesh *> mMeshes;
|
||||||
|
|
||||||
Node() AI_NO_EXCEPT
|
Node() AI_NO_EXCEPT
|
||||||
: mName(),
|
: mTrafoMatrix(),
|
||||||
mTrafoMatrix(),
|
mParent(nullptr) {
|
||||||
mParent(nullptr),
|
|
||||||
mChildren(),
|
|
||||||
mMeshes() {
|
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
explicit Node(Node *pParent) :
|
explicit Node(Node *pParent) :
|
||||||
mName(), mTrafoMatrix(), mParent(pParent), mChildren(), mMeshes() {
|
mTrafoMatrix(), mParent(pParent) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,8 +198,6 @@ struct Scene {
|
||||||
|
|
||||||
Scene() AI_NO_EXCEPT
|
Scene() AI_NO_EXCEPT
|
||||||
: mRootNode(nullptr),
|
: mRootNode(nullptr),
|
||||||
mGlobalMeshes(),
|
|
||||||
mGlobalMaterials(),
|
|
||||||
mAnimTicksPerSecond(0) {
|
mAnimTicksPerSecond(0) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,9 +75,7 @@ static const aiImporterDesc desc = {
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
XFileImporter::XFileImporter() : mBuffer() {
|
XFileImporter::XFileImporter() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
|
|
|
@ -52,22 +52,14 @@ class X3DExporter {
|
||||||
struct SAttribute {
|
struct SAttribute {
|
||||||
const std::string Name;
|
const std::string Name;
|
||||||
const std::string Value;
|
const std::string Value;
|
||||||
SAttribute() :
|
SAttribute() = default;
|
||||||
Name(),
|
|
||||||
Value() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
SAttribute(const std::string &name, const std::string &value) :
|
SAttribute(const std::string &name, const std::string &value) :
|
||||||
Name(name),
|
Name(name),
|
||||||
Value(value) {
|
Value(value) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
SAttribute(SAttribute &&rhs) AI_NO_EXCEPT :
|
SAttribute(SAttribute &&rhs) AI_NO_EXCEPT = default;
|
||||||
Name(rhs.Name),
|
|
||||||
Value(rhs.Value) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
|
|
|
@ -108,9 +108,7 @@ struct X3DNodeElementBase {
|
||||||
std::list<X3DNodeElementBase *> Children;
|
std::list<X3DNodeElementBase *> Children;
|
||||||
X3DElemType Type;
|
X3DElemType Type;
|
||||||
|
|
||||||
virtual ~X3DNodeElementBase() {
|
virtual ~X3DNodeElementBase() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
X3DNodeElementBase(X3DElemType type, X3DNodeElementBase *pParent) :
|
X3DNodeElementBase(X3DElemType type, X3DNodeElementBase *pParent) :
|
||||||
|
@ -367,9 +365,7 @@ struct X3DNodeElementMeta : X3DNodeElementBase {
|
||||||
std::string Name; ///< Name of metadata object.
|
std::string Name; ///< Name of metadata object.
|
||||||
std::string Reference;
|
std::string Reference;
|
||||||
|
|
||||||
virtual ~X3DNodeElementMeta() {
|
virtual ~X3DNodeElementMeta() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
X3DNodeElementMeta(X3DElemType type, X3DNodeElementBase *parent) :
|
X3DNodeElementMeta(X3DElemType type, X3DNodeElementBase *parent) :
|
||||||
|
|
|
@ -629,9 +629,7 @@ struct Mesh : public Object {
|
||||||
SExtension(const EType pType) :
|
SExtension(const EType pType) :
|
||||||
Type(pType) {}
|
Type(pType) {}
|
||||||
|
|
||||||
virtual ~SExtension() {
|
virtual ~SExtension() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
||||||
|
@ -657,9 +655,7 @@ struct Mesh : public Object {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~SCompression_Open3DGC() {
|
virtual ~SCompression_Open3DGC() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ static const aiImporterDesc desc = {
|
||||||
};
|
};
|
||||||
|
|
||||||
glTFImporter::glTFImporter() :
|
glTFImporter::glTFImporter() :
|
||||||
BaseImporter(), meshOffsets(), embeddedTexIdxs(), mScene(nullptr) {
|
mScene(nullptr) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,16 +365,7 @@ struct CustomExtension {
|
||||||
|
|
||||||
~CustomExtension() = default;
|
~CustomExtension() = default;
|
||||||
|
|
||||||
CustomExtension(const CustomExtension &other) :
|
CustomExtension(const CustomExtension &other) = default;
|
||||||
name(other.name),
|
|
||||||
mStringValue(other.mStringValue),
|
|
||||||
mDoubleValue(other.mDoubleValue),
|
|
||||||
mUint64Value(other.mUint64Value),
|
|
||||||
mInt64Value(other.mInt64Value),
|
|
||||||
mBoolValue(other.mBoolValue),
|
|
||||||
mValues(other.mValues) {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomExtension& operator=(const CustomExtension&) = default;
|
CustomExtension& operator=(const CustomExtension&) = default;
|
||||||
};
|
};
|
||||||
|
@ -1086,8 +1077,7 @@ struct AssetMetadata {
|
||||||
|
|
||||||
void Read(Document &doc);
|
void Read(Document &doc);
|
||||||
|
|
||||||
AssetMetadata() :
|
AssetMetadata() = default;
|
||||||
version() {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -96,9 +96,6 @@ static const aiImporterDesc desc = {
|
||||||
};
|
};
|
||||||
|
|
||||||
glTF2Importer::glTF2Importer() :
|
glTF2Importer::glTF2Importer() :
|
||||||
BaseImporter(),
|
|
||||||
meshOffsets(),
|
|
||||||
mEmbeddedTexIdxs(),
|
|
||||||
mScene(nullptr) {
|
mScene(nullptr) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,9 +93,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
~FileSystemFilter() {
|
~FileSystemFilter() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Tests for the existence of a file at the given path. */
|
/** Tests for the existence of a file at the given path. */
|
||||||
|
|
|
@ -128,9 +128,7 @@ public:
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE
|
AI_FORCE_INLINE
|
||||||
IOStream::IOStream() AI_NO_EXCEPT {
|
IOStream::IOStream() AI_NO_EXCEPT = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE
|
AI_FORCE_INLINE
|
||||||
|
|
|
@ -141,9 +141,7 @@ AI_FORCE_INLINE IOStreamBuffer<T>::IOStreamBuffer(size_t cache) :
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
AI_FORCE_INLINE IOStreamBuffer<T>::~IOStreamBuffer() {
|
AI_FORCE_INLINE IOStreamBuffer<T>::~IOStreamBuffer() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
AI_FORCE_INLINE bool IOStreamBuffer<T>::open(IOStream *stream) {
|
AI_FORCE_INLINE bool IOStreamBuffer<T>::open(IOStream *stream) {
|
||||||
|
|
|
@ -237,10 +237,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE IOSystem::IOSystem() AI_NO_EXCEPT :
|
AI_FORCE_INLINE IOSystem::IOSystem() AI_NO_EXCEPT = default;
|
||||||
m_pathStack() {
|
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE IOSystem::~IOSystem() = default;
|
AI_FORCE_INLINE IOSystem::~IOSystem() = default;
|
||||||
|
|
|
@ -145,7 +145,6 @@ private:
|
||||||
|
|
||||||
AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_empty_lines, bool trim ) :
|
AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_empty_lines, bool trim ) :
|
||||||
mIdx(0),
|
mIdx(0),
|
||||||
mCur(),
|
|
||||||
mStream(stream),
|
mStream(stream),
|
||||||
mSwallow(),
|
mSwallow(),
|
||||||
mSkip_empty_lines(skip_empty_lines),
|
mSkip_empty_lines(skip_empty_lines),
|
||||||
|
@ -155,9 +154,7 @@ AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_emp
|
||||||
mIdx = 0;
|
mIdx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AI_FORCE_INLINE LineSplitter::~LineSplitter() {
|
AI_FORCE_INLINE LineSplitter::~LineSplitter() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
|
AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
|
||||||
if (mSwallow) {
|
if (mSwallow) {
|
||||||
|
|
|
@ -162,8 +162,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
~MemoryIOSystem() {
|
~MemoryIOSystem() = default;
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Tests for the existence of a file at the given path. */
|
/** Tests for the existence of a file at the given path. */
|
||||||
|
|
|
@ -68,9 +68,7 @@ using namespace Formatter;
|
||||||
*/
|
*/
|
||||||
class Profiler {
|
class Profiler {
|
||||||
public:
|
public:
|
||||||
Profiler() {
|
Profiler() = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Start a named timer */
|
/** Start a named timer */
|
||||||
|
|
|
@ -67,15 +67,11 @@ class ASSIMP_API ProgressHandler
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
/// @brief Default constructor
|
/// @brief Default constructor
|
||||||
ProgressHandler () AI_NO_EXCEPT {
|
ProgressHandler () AI_NO_EXCEPT = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @brief Virtual destructor.
|
/// @brief Virtual destructor.
|
||||||
virtual ~ProgressHandler () {
|
virtual ~ProgressHandler () = default;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** @brief Progress callback.
|
/** @brief Progress callback.
|
||||||
|
|
|
@ -191,13 +191,9 @@ struct SceneHelper {
|
||||||
*/
|
*/
|
||||||
class ASSIMP_API SceneCombiner {
|
class ASSIMP_API SceneCombiner {
|
||||||
// class cannot be instanced
|
// class cannot be instanced
|
||||||
SceneCombiner() {
|
SceneCombiner() = delete;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
~SceneCombiner() {
|
~SceneCombiner() = delete;
|
||||||
// empty
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue