From 6f5a7b3ab78d55c9e2ac80f005e5ec7c2f387c5e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 9 Jan 2019 06:46:41 -0800 Subject: [PATCH] 3d-viewer: Clear memset warnings C++11 can clear by empty copy-constructor --- 3d-viewer/3d_cache/sg/sg_node.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/3d-viewer/3d_cache/sg/sg_node.cpp b/3d-viewer/3d_cache/sg/sg_node.cpp index fe1efc0d35..3049ac6987 100644 --- a/3d-viewer/3d_cache/sg/sg_node.cpp +++ b/3d-viewer/3d_cache/sg/sg_node.cpp @@ -358,22 +358,19 @@ bool S3D::GetMatIndex( MATLIST& aList, SGNODE* aNode, int& aIndex ) void S3D::INIT_SMATERIAL( SMATERIAL& aMaterial ) { - memset( &aMaterial, 0, sizeof( aMaterial ) ); - return; + aMaterial = {}; } void S3D::INIT_SMESH( SMESH& aMesh ) { - memset( &aMesh, 0, sizeof( aMesh ) ); - return; + aMesh = {}; } void S3D::INIT_S3DMODEL( S3DMODEL& aModel ) { - memset( &aModel, 0, sizeof( aModel ) ); - return; + aModel = {}; }