diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp index 2bd9d7544..b1ed85380 100644 --- a/code/X3DImporter.cpp +++ b/code/X3DImporter.cpp @@ -73,24 +73,29 @@ const aiImporterDesc X3DImporter::Description = { "x3d" }; -void X3DImporter::Clear() -{ +X3DImporter::X3DImporter() +: NodeElement_Cur( nullptr ) +, mReader( nullptr ) { + // empty +} + +X3DImporter::~X3DImporter() { + delete mReader; + // Clear() is accounting if data already is deleted. So, just check again if all data is deleted. + Clear(); +} + +void X3DImporter::Clear() { NodeElement_Cur = nullptr; // Delete all elements - if(NodeElement_List.size()) - { - for(std::list::iterator it = NodeElement_List.begin(); it != NodeElement_List.end(); it++) delete *it; - + if(NodeElement_List.size()) { + for ( std::list::iterator it = NodeElement_List.begin(); it != NodeElement_List.end(); it++ ) { + delete *it; + } NodeElement_List.clear(); } } -X3DImporter::~X3DImporter() -{ - delete mReader; - // Clear() is accounting if data already is deleted. So, just check again if all data is deleted. - Clear(); -} /*********************************************************************************************************************************************/ /************************************************************ Functions: find set ************************************************************/ diff --git a/code/X3DImporter.hpp b/code/X3DImporter.hpp index 2978643ad..447a3f1e4 100644 --- a/code/X3DImporter.hpp +++ b/code/X3DImporter.hpp @@ -56,8 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "irrXMLWrapper.h" -namespace Assimp -{ +namespace Assimp { /// \class X3DImporter /// Class that holding scene graph which include: groups, geometry, metadata etc. @@ -199,9 +198,7 @@ public: /***********************************************/ /// Default constructor. - X3DImporter() - : NodeElement_Cur( nullptr ), mReader( nullptr ) - {} + X3DImporter(); /// Default destructor. ~X3DImporter(); @@ -211,7 +208,7 @@ public: /***********************************************/ /// Parse X3D file and fill scene graph. The function has no return value. Result can be found by analyzing the generated graph. - /// Also exception can be throwed if trouble will found. + /// Also exception can be thrown if trouble will found. /// \param [in] pFile - name of file to be parsed. /// \param [in] pIOHandler - pointer to IO helper object. void ParseFile( const std::string& pFile, IOSystem* pIOHandler ); diff --git a/include/assimp/config.h.in b/include/assimp/config.h.in index 63369cabf..db197822e 100644 --- a/include/assimp/config.h.in +++ b/include/assimp/config.h.in @@ -323,14 +323,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @brief Set the maximum number of bones affecting a single vertex * * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step. - * @note The default value is AI_CONFIG_PP_LBW_MAX_WEIGHTS + * @note The default value is AI_LMW_MAX_WEIGHTS * Property type: integer.*/ #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \ "PP_LBW_MAX_WEIGHTS" // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS #if (!defined AI_LMW_MAX_WEIGHTS) -# define AI_CONFIG_PP_LBW_MAX_WEIGHTS 0x4 +# define AI_LMW_MAX_WEIGHTS 0x4 #endif // !! AI_LMW_MAX_WEIGHTS // ---------------------------------------------------------------------------