From eb828a3b71f21d791b95e41049443d5ce1624579 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 9 May 2017 21:35:21 +0200 Subject: [PATCH] X3DImporter: fix coverity findings. --- code/X3DImporter_Node.hpp | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/code/X3DImporter_Node.hpp b/code/X3DImporter_Node.hpp index 7d570d2..441d33e 100644 --- a/code/X3DImporter_Node.hpp +++ b/code/X3DImporter_Node.hpp @@ -467,42 +467,29 @@ public: /// \class CX3DImporter_NodeElement_Geometry3D /// Three-dimensional body. -class CX3DImporter_NodeElement_Geometry3D : public CX3DImporter_NodeElement -{ - /***********************************************/ - /****************** Variables ******************/ - /***********************************************/ - +class CX3DImporter_NodeElement_Geometry3D : public CX3DImporter_NodeElement { public: + std::list Vertices; ///< Vertices list. + size_t NumIndices;///< Number of indices in one face. + bool Solid; ///< Flag: if true then render must use back-face culling, else render must draw both sides of object. - std::list Vertices;///< Vertices list. - size_t NumIndices;///< Number of indices in one face. - bool Solid;///< Flag: if true then render must use back-face culling, else render must draw both sides of object. - - /***********************************************/ - /****************** Functions ******************/ - /***********************************************/ + /// Constructor. + /// \param [in] pParent - pointer to parent node. + /// \param [in] pType - type of geometry object. + CX3DImporter_NodeElement_Geometry3D(const EType pType, CX3DImporter_NodeElement* pParent) + : CX3DImporter_NodeElement(pType, pParent) + , Vertices() + , NumIndices( 0 ) + , Solid(true) { + // empty + } private: - - /// \fn CX3DImporter_NodeElement_Geometry3D(const CX3DImporter_NodeElement_Geometry3D& pNode) /// Disabled copy constructor. CX3DImporter_NodeElement_Geometry3D(const CX3DImporter_NodeElement_Geometry3D& pNode); - /// \fn CX3DImporter_NodeElement_Geometry3D& operator=(const CX3DImporter_NodeElement_Geometry3D& pNode) /// Disabled assign operator. CX3DImporter_NodeElement_Geometry3D& operator=(const CX3DImporter_NodeElement_Geometry3D& pNode); - -public: - - /// \fn CX3DImporter_NodeElement_Geometry3D(const EType pType, CX3DImporter_NodeElement* pParent) - /// Constructor. - /// \param [in] pParent - pointer to parent node. - /// \param [in] pType - type of geometry object. - CX3DImporter_NodeElement_Geometry3D(const EType pType, CX3DImporter_NodeElement* pParent) - : CX3DImporter_NodeElement(pType, pParent), Solid(true) - {} - };// class CX3DImporter_NodeElement_Geometry3D /// \class CX3DImporter_NodeElement_ElevationGrid -- 2.7.4