From: Mikko Rasa Date: Mon, 11 Oct 2021 13:20:11 +0000 (+0300) Subject: Minor cleanups and tweaks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ba55832910f04b90695da360b5889fa85e83c1e1;p=libs%2Fgl.git Minor cleanups and tweaks --- diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index e370b7c7..262e4248 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -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 diff --git a/source/core/reflectdata.h b/source/core/reflectdata.h index 5041b579..33ef1799 100644 --- a/source/core/reflectdata.h +++ b/source/core/reflectdata.h @@ -56,7 +56,7 @@ struct ReflectData std::vector uniform_blocks; std::vector uniforms; - LayoutHash layout_hash; + LayoutHash layout_hash = 0; std::vector attributes; unsigned n_clip_distances = 0; diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index dff52639..8b00e82e 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -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) diff --git a/source/glsl/syntax.h b/source/glsl/syntax.h index d3797ac4..8567555a 100644 --- a/source/glsl/syntax.h +++ b/source/glsl/syntax.h @@ -525,7 +525,7 @@ struct Stage }; Type type; - Stage *previous; + Stage *previous = 0; Block content; std::map types; std::map interface_blocks; diff --git a/source/render/sequence.cpp b/source/render/sequence.cpp index f7dea9bf..44a7381b 100644 --- a/source/render/sequence.cpp +++ b/source/render/sequence.cpp @@ -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())