]> git.tdb.fi Git - libs/gl.git/commitdiff
Minor cleanups and tweaks
authorMikko Rasa <tdb@tdb.fi>
Mon, 11 Oct 2021 13:20:11 +0000 (16:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 11 Oct 2021 13:20:11 +0000 (16:20 +0300)
source/core/framebuffer.h
source/core/reflectdata.h
source/glsl/syntax.cpp
source/glsl/syntax.h
source/render/sequence.cpp

index e370b7c7f38976c2211c496c4c6c5e640f835e07..262e4248c3e251ddeb86e99ef335dc4e4ad501a3 100644 (file)
@@ -80,8 +80,8 @@ private:
        void update() const;
        void check_size();
        void set_attachment(FrameAttachment, Texture &, unsigned, int, unsigned);
-public:
 
+public:
        /** Attaches a texture to the framebuffer.  Only the attachment point
        portion of attch is considered; pixel format is ignored.  The framebuffer
        must have a format and the format of the texture must match that defined
index 5041b5796284e2c419f143678f372ac725ac4981..33ef1799ea469805832af7d9752a8888cf555036 100644 (file)
@@ -56,7 +56,7 @@ struct ReflectData
 
        std::vector<UniformBlockInfo> uniform_blocks;
        std::vector<UniformInfo> uniforms;
-       LayoutHash layout_hash;
+       LayoutHash layout_hash = 0;
        std::vector<AttributeInfo> attributes;
        unsigned n_clip_distances = 0;
 
index dff52639b0e2c835d43a4f622f4d4b590d8b13cf..8b00e82e46eae73f397c599f6a9e3ea0008b4e3a 100644 (file)
@@ -366,8 +366,7 @@ void Jump::visit(NodeVisitor &visitor)
 
 
 Stage::Stage(Stage::Type t):
-       type(t),
-       previous(0)
+       type(t)
 { }
 
 const char *Stage::get_stage_name(Type type)
index d3797ac415ecb73c222220c1596a82c7fb2b9fed..8567555a5d342ef6dfadeab58627fa2ccc0e2ef8 100644 (file)
@@ -525,7 +525,7 @@ struct Stage
        };
 
        Type type;
-       Stage *previous;
+       Stage *previous = 0;
        Block content;
        std::map<std::string, TypeDeclaration *> types;
        std::map<std::string, InterfaceBlock *> interface_blocks;
index f7dea9bf617ebf1db173fec541408b0735b4989b..44a7381b160044f60c8e15c6d88617513715f786 100644 (file)
@@ -150,7 +150,7 @@ void Sequence::render(Renderer &renderer, Tag tag) const
                renderer.set_stencil_test(&s.get_stencil_test());
                renderer.set_blend(&s.get_blend());
 
-               if (const Lighting *lighting = s.get_lighting())
+               if(const Lighting *lighting = s.get_lighting())
                        renderer.add_shader_data(lighting->get_shader_data());
 
                if(const Renderable *renderable = s.get_renderable())