]> git.tdb.fi Git - libs/gl.git/commitdiff
Use default member initializers for ZSortedScene::SortedRenderable
authorMikko Rasa <tdb@tdb.fi>
Mon, 14 Mar 2022 07:13:37 +0000 (09:13 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 14 Mar 2022 07:13:37 +0000 (09:13 +0200)
source/render/zsortedscene.cpp
source/render/zsortedscene.h

index bdce8aa9cd4f9cab7126d2dd0d7630f99219ebc2..733e3d084632be8b6215fe25c8b9c0d3cc54b3f7 100644 (file)
@@ -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
index be23ac271979be39fda50a9a248847ff195b2bfb..a498164cd6bea37806419ed92b59d6aa5cc01ef2 100644 (file)
@@ -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<o.depth; }
        };