From: Mikko Rasa Date: Mon, 14 Mar 2022 07:13:37 +0000 (+0200) Subject: Use default member initializers for ZSortedScene::SortedRenderable X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ac73cd6d7701d58502cf0e6c82411913f4abfe5d;p=libs%2Fgl.git Use default member initializers for ZSortedScene::SortedRenderable --- diff --git a/source/render/zsortedscene.cpp b/source/render/zsortedscene.cpp index bdce8aa9..733e3d08 100644 --- a/source/render/zsortedscene.cpp +++ b/source/render/zsortedscene.cpp @@ -120,12 +120,5 @@ void ZSortedScene::render(Renderer &renderer, Tag tag) const i->renderable->render(renderer, tag); } - -ZSortedScene::SortedRenderable::SortedRenderable(Renderable *r): - renderable(r), - in_frustum(false), - depth(0.0f) -{ } - } // namespace GL } // namespace Msp diff --git a/source/render/zsortedscene.h b/source/render/zsortedscene.h index be23ac27..a498164c 100644 --- a/source/render/zsortedscene.h +++ b/source/render/zsortedscene.h @@ -37,10 +37,10 @@ private: struct SortedRenderable { Renderable *renderable; - bool in_frustum; - float depth; + bool in_frustum = false; + float depth = 0.0f; - SortedRenderable(Renderable *); + SortedRenderable(Renderable *r): renderable(r) { } bool operator<(const SortedRenderable &o) const { return depth