Mesh: modernize C++: use default member init

This commit is contained in:
wmayer
2023-08-22 23:26:50 +02:00
committed by wwmayer
parent bc8e9f5f29
commit e613167d8d
48 changed files with 116 additions and 177 deletions

View File

@@ -74,12 +74,11 @@ class MeshRenderer::Private {
public:
Gui::OpenGLMultiBuffer vertices;
Gui::OpenGLMultiBuffer indices;
const SbColor * pcolors;
SoMaterialBindingElement::Binding matbinding;
bool initialized;
const SbColor * pcolors{nullptr};
SoMaterialBindingElement::Binding matbinding{SoMaterialBindingElement::OVERALL};
bool initialized{false};
Private();
~Private();
bool canRenderGLArray(SoGLRenderAction *) const;
void generateGLArrays(SoGLRenderAction* action,
SoMaterialBindingElement::Binding matbind,
@@ -96,14 +95,9 @@ private:
MeshRenderer::Private::Private()
: vertices(GL_ARRAY_BUFFER)
, indices(GL_ELEMENT_ARRAY_BUFFER)
, pcolors(nullptr)
, matbinding(SoMaterialBindingElement::OVERALL)
, initialized(false)
{
}
MeshRenderer::Private::~Private() = default;
bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction *action) const
{
static bool init = false;
@@ -461,7 +455,6 @@ void SoFCIndexedFaceSet::initClass()
SoFCIndexedFaceSet::SoFCIndexedFaceSet()
: renderTriangleLimit(UINT_MAX)
, selectBuf(nullptr)
{
SO_NODE_CONSTRUCTOR(SoFCIndexedFaceSet);
SO_NODE_ADD_FIELD(updateGLArray, (false));