]> git.tdb.fi Git - libs/gl.git/commitdiff
Use the override specifier on overridden virtual functions
authorMikko Rasa <tdb@tdb.fi>
Sun, 10 Dec 2023 10:53:21 +0000 (12:53 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 10 Dec 2023 21:59:16 +0000 (23:59 +0200)
88 files changed:
source/animation/animatedobject.h
source/animation/animation.h
source/animation/animationplayer.h
source/backends/opengl/texture1d_backend.h
source/backends/opengl/texture2d_backend.h
source/backends/opengl/texture2darray_backend.h
source/backends/opengl/texture2dmultisample_backend.h
source/backends/opengl/texture3d_backend.h
source/backends/opengl/texturecube_backend.h
source/backends/opengl/windowview_backend.h
source/backends/vulkan/swapchaintexture.h
source/backends/vulkan/texture1d_backend.h
source/backends/vulkan/texture2d_backend.h
source/backends/vulkan/texture2darray_backend.h
source/backends/vulkan/texture2dmultisample_backend.h
source/backends/vulkan/texture3d_backend.h
source/backends/vulkan/texturecube_backend.h
source/backends/vulkan/windowview_backend.h
source/builders/box.h
source/builders/capsule.h
source/builders/cylinder.h
source/builders/grid.h
source/builders/meshbuilder.h
source/builders/primitivebuilder.h
source/builders/sequencetemplate.h
source/builders/sphere.h
source/builders/vertexarraybuilder.h
source/core/batch.h
source/core/mesh.h
source/core/module.h
source/core/program.h
source/core/texture.h
source/core/texture1d.h
source/core/texture2d.cpp
source/core/texture2d.h
source/core/texture2dmultisample.h
source/core/texture3d.h
source/core/texturecube.h
source/core/uniformblock.h
source/core/vertexarray.h
source/effects/ambientocclusion.h
source/effects/bloom.h
source/effects/colorcurve.h
source/effects/effect.h
source/effects/environmentmap.h
source/effects/shadowmap.h
source/effects/sky.h
source/glsl/debug.h
source/glsl/finalize.h
source/glsl/generate.h
source/glsl/optimize.h
source/glsl/output.h
source/glsl/reflect.h
source/glsl/resolve.h
source/glsl/spirv.h
source/glsl/syntax.h
source/glsl/validate.h
source/glsl/visitor.h
source/materials/basicmaterial.h
source/materials/directionallight.h
source/materials/light.h
source/materials/lighting.h
source/materials/material.h
source/materials/pbrmaterial.h
source/materials/pointlight.h
source/materials/rendermethod.h
source/materials/splatmaterial.h
source/materials/technique.h
source/materials/unlitmaterial.h
source/render/camera.h
source/render/instancearray.h
source/render/object.h
source/render/objectinstance.h
source/render/occludedscene.h
source/render/offscreenview.h
source/render/orderedscene.h
source/render/placeable.h
source/render/scene.h
source/render/sequence.h
source/render/simplescene.h
source/render/slot.h
source/render/text.h
source/render/windowview.h
source/render/zsortedscene.h
source/resources/resourcemanager.h
source/resources/resources.h
tools/glslcompiler.cpp
tools/viewer.cpp

index ead6231cf0490b09bb6359477d452ac5fee5ea42..bb2cf4906a6d9eb63c4c4bd3bc979068a9050f75 100644 (file)
@@ -43,9 +43,9 @@ public:
 
        DEPRECATED void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &);
 
-       virtual const Matrix *get_matrix() const { return &matrix; }
+       const Matrix *get_matrix() const override { return &matrix; }
 
-       virtual void setup_render(Renderer &, Tag) const;
+       void setup_render(Renderer &, Tag) const override;
 };
 
 } // namespace GL
index d3ea724f4fc6de2f6625580127b80f44ca7a978c..997d0d936b59fc6b07a295eea88663d797e7a4d1 100644 (file)
@@ -36,7 +36,7 @@ public:
                Loader(Animation &, Collection &);
        private:
                Loader(Animation &, Collection *);
-               virtual void finish();
+               void finish() override;
 
                void check_slopes_and_control(bool, bool);
                void add_kf(const KeyFrame *, bool, bool);
@@ -92,8 +92,8 @@ private:
        public:
                ValueCurve(CurveTarget, int, const std::vector<Knot> &);
 
-               virtual void apply(float, Matrix &) const;
-               virtual void apply(float, KeyFrame::AnimatedUniform &) const;
+               void apply(float, Matrix &) const override;
+               void apply(float, KeyFrame::AnimatedUniform &) const override;
        };
 
        struct ExtractComponent
index 4947a8c9e503cdca5f95e56e2b171b1e0423457d..eccd8bd3dc43e2c3fdc7d784fa95d330c561d56a 100644 (file)
@@ -40,7 +40,7 @@ private:
 
                Target(Placeable &);
 
-               virtual void animation_event(Placeable *, const std::string &, const Variant &);
+               void animation_event(Placeable *, const std::string &, const Variant &) override;
        };
 
        std::map<const Placeable *, Target> objects;
index 4dd606546284dd3dc248c1c686a51e4b88bb6189..54ceed5839a8a734b7f21630229b8a3aff17d773 100644 (file)
@@ -16,9 +16,9 @@ protected:
        void sub_image(unsigned, int, unsigned, const void *);
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture1DBackend = OpenGLTexture1D;
index d1f4735e1d194047ef9647c3aff25bd662bdd454..c7d0fa5ff3c945f0115b4ca57b9eb6fe37d155ff 100644 (file)
@@ -32,8 +32,8 @@ protected:
        void sub_image(unsigned, int, int, unsigned, unsigned, const void *);
 
 public:
-       virtual std::size_t get_data_size() const;
-       virtual void unload();
+       std::size_t get_data_size() const override;
+       void unload() override;
 };
 
 using Texture2DBackend = OpenGLTexture2D;
index 3b8859eff67ff4135c362ae3c4de63df1bb4a55a..f08af76c70d3710013f0f0e18332aa9b3056da83 100644 (file)
@@ -13,7 +13,7 @@ protected:
        OpenGLTexture2DArray();
 
 public:
-       virtual std::size_t get_data_size() const;
+       std::size_t get_data_size() const override;
 };
 
 using Texture2DArrayBackend = OpenGLTexture2DArray;
index a2ca6aa64a52cf78481cf276546be0fccf8a1e3f..17fb84115597971033d391a29fa003418c14d88b 100644 (file)
@@ -15,9 +15,9 @@ protected:
        void allocate();
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture2DMultisampleBackend = OpenGLTexture2DMultisample;
index 5a66142c71e00862d1d86b7b7e34f368f72b5a77..fc17fb89fd4408a3229d50b470f8fb7b141bc7c4 100644 (file)
@@ -19,9 +19,9 @@ protected:
        bool is_array() const;
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture3DBackend = OpenGLTexture3D;
index a2424434174e5ec35f20728949d68ff006d67b08..b75acf8ce8c4d371ea772fb8c2c253152460cda3 100644 (file)
@@ -16,9 +16,9 @@ protected:
        void sub_image(unsigned, unsigned, int, int, unsigned, unsigned, const void *);
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using TextureCubeBackend = OpenGLTextureCube;
index 2160a0df46e4c8cc818264c3436df83c1b2de7a3..e22503da2d12269f1b8c5792f1b25e423eca2140 100644 (file)
@@ -15,8 +15,8 @@ protected:
 
        OpenGLWindowView() = default;
 
-       virtual void render();
-       virtual const Framebuffer &get_target() const { return sys_framebuf; }
+       void render() override;
+       const Framebuffer &get_target() const override { return sys_framebuf; }
 
        void resize_framebuffer(unsigned, unsigned);
 };
index f9fc7cd9b3f1bac62bee7915ebe3919ece54591b..a3d26efbbfc82ea7cf689c2630b2c6a236d95f65 100644 (file)
@@ -14,7 +14,7 @@ private:
        SwapChainTexture(PixelFormat, unsigned, unsigned, VkImage);
 public:
        SwapChainTexture(SwapChainTexture &&) = default;
-       ~SwapChainTexture();
+       ~SwapChainTexture() override;
 };
 
 } // namespace GL
index 48ae32df36f9642dcd9872553d59f5e0a44fd3ff..9d807f71539940f6c67f6eb1ccdaa416fa418c77 100644 (file)
@@ -12,14 +12,14 @@ class MSPGL_API VulkanTexture1D: public Texture
 protected:
        VulkanTexture1D();
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
        void sub_image(unsigned, int, unsigned, const void *);
-       virtual void fill_mipmap_blit(unsigned, void *);
+       void fill_mipmap_blit(unsigned, void *) override;
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture1DBackend = VulkanTexture1D;
index ccc41c2653b35187871d8cd9c3bf5a2153c81cbf..a01d87918a574f781fc912e99f730f4b257c08bb 100644 (file)
@@ -23,13 +23,13 @@ protected:
 
        VulkanTexture2D();
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
        void sub_image(unsigned, int, int, unsigned, unsigned, const void *);
-       virtual void fill_mipmap_blit(unsigned, void *);
+       void fill_mipmap_blit(unsigned, void *) override;
 
 public:
-       virtual std::size_t get_data_size() const;
-       virtual void unload();
+       std::size_t get_data_size() const override;
+       void unload() override;
 };
 
 using Texture2DBackend = VulkanTexture2D;
index bac9efffdfb5377bc4d4892a0bad51867dc46aab..4acf3a4c76cb7064c2a476b358a29a7d6dd840c0 100644 (file)
@@ -12,7 +12,7 @@ class MSPGL_API VulkanTexture2DArray: public Texture3D
 protected:
        VulkanTexture2DArray();
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
 };
 
 using Texture2DArrayBackend = VulkanTexture2DArray;
index d898ede5317f14847b9956eace6bdf36b04cfb42..108acda7e756e26242f0ca76f9c8078ee7ead694 100644 (file)
@@ -12,14 +12,14 @@ class MSPGL_API VulkanTexture2DMultisample: public Texture
 protected:
        VulkanTexture2DMultisample();
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
        virtual void generate_mipmap();
-       virtual void fill_mipmap_blit(unsigned, void *) { }
+       void fill_mipmap_blit(unsigned, void *) override { }
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture2DMultisampleBackend = VulkanTexture2DMultisample;
index 421eca3a85ac6f2aa5d40d8c3e47da920104de19..dc52829f2963d03acb82200c786cdb0f2b570b57 100644 (file)
@@ -13,16 +13,16 @@ protected:
        VulkanTexture3D();
        VulkanTexture3D(unsigned);
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
        void sub_image(unsigned, int, int, int, unsigned, unsigned, unsigned, const void *);
-       virtual void fill_mipmap_blit(unsigned, void *);
+       void fill_mipmap_blit(unsigned, void *) override;
 
        bool is_array() const;
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using Texture3DBackend = VulkanTexture3D;
index 91c4b7ec5244ce36061cb646f6c6cff1bf9b9cb5..9d824411def2583d250e12250d8f5d172d7693f7 100644 (file)
@@ -12,14 +12,14 @@ class MSPGL_API VulkanTextureCube: public Texture
 protected:
        VulkanTextureCube();
 
-       virtual void fill_image_info(void *) const;
+       void fill_image_info(void *) const override;
        void sub_image(unsigned, unsigned, int, int, unsigned, unsigned, const void *);
-       virtual void fill_mipmap_blit(unsigned, void *);
+       void fill_mipmap_blit(unsigned, void *) override;
 
 public:
-       virtual AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) { return nullptr; }
-       virtual std::size_t get_data_size() const;
-       virtual void unload() { }
+       AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override { return nullptr; }
+       std::size_t get_data_size() const override;
+       void unload() override { }
 };
 
 using TextureCubeBackend = VulkanTextureCube;
index 9ca2cbba1d9b307784924bd836a37a1d737e5766..f98a65637c36436ce3f245efc32f6722765abd55 100644 (file)
@@ -21,10 +21,10 @@ protected:
        unsigned frame_index = 0;
 
        VulkanWindowView() = default;
-       ~VulkanWindowView();
+       ~VulkanWindowView() override;
 
-       virtual void render();
-       virtual const Framebuffer &get_target() const { return *current_target; }
+       void render() override;
+       const Framebuffer &get_target() const override { return *current_target; }
 
        void resize_framebuffer(unsigned, unsigned);
 };
index dec6ffa5a901e9a88eae3174f3f30d5628bc96b5..5efcfc3843cacf47c65e326ecb0084cc1df0197e 100644 (file)
@@ -19,7 +19,7 @@ public:
        BoxBuilder(const Vector3 &, const Vector3 &);
 
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 private:
        void build_face(PrimitiveBuilder &, const Vector3 &, const Vector3 &, const Vector3 &) const;
 };
index 49ff3a5fff8c24964e6d70ee298d81da98387935..0b6ba21cbd0ab4455b277923e4cabb46c20dd4ce 100644 (file)
@@ -19,7 +19,7 @@ public:
        CapsuleBuilder(float, float, unsigned = 16, unsigned = 9);
 
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 };
 
 } // namepace GL
index 85e66bdc127cbe153820c13408e24dcc6c08b221..4cbbfb7cbf612c7767028e654a5e1ecd303ea481 100644 (file)
@@ -18,7 +18,7 @@ public:
        CylinderBuilder(float, float, unsigned = 16);
 
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 };
 
 } // namespace GL
index a731aa0f325f7e26b938edee26dd9a626aa7501f..bfecae569c01a9806a8174224c353ffa7d4c92a1 100644 (file)
@@ -28,7 +28,7 @@ private:
 
 public:
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 };
 
 } // namespace GL
index e94b6effa128e9e6b38826dbcf94739828b1b3ce..ff52ee684692afbb9dd8f7a23f4b1226ed968711 100644 (file)
@@ -18,13 +18,13 @@ private:
 
 public:
        MeshBuilder(Mesh &);
-       ~MeshBuilder();
+       ~MeshBuilder() override;
 
        void auto_offset();
 private:
-       virtual void begin_();
-       virtual void end_();
-       virtual void element_(unsigned);
+       void begin_() override;
+       void end_() override;
+       void element_(unsigned) override;
 };
 
 } // namespace GL
index 1e2fda4b1cd8e90d488361d47a405262b84da5d0..74987cfce7c5e5d3b0682efc6097a2e69a67d923 100644 (file)
@@ -34,7 +34,7 @@ public:
        void element(unsigned);
        PrimitiveType get_type() const;
 protected:
-       virtual void vertex_(const Vector4 &);
+       void vertex_(const Vector4 &) override;
        virtual void begin_() = 0;
        virtual void end_() = 0;
        virtual void element_(unsigned) = 0;
index 12b4f717dd6b012b451dd37c5ca40b61723f3a1e..b5601a6884748edca7c6e817c46907f50b3ef55f 100644 (file)
@@ -32,7 +32,7 @@ private:
                TemplateLoader(typename DataFile::DynamicObjectLoader<typename T::Template>::Collection &c): DataFile::DynamicObjectLoader<typename T::Template>(&c) { }
 
        private:
-               virtual typename DataFile::DynamicObjectLoader<typename T::Template>::TypeRegistry &get_type_registry() const { return get_registry<T>(); }
+               typename DataFile::DynamicObjectLoader<typename T::Template>::TypeRegistry &get_type_registry() const override { return get_registry<T>(); }
        };
 
        template<typename T>
@@ -47,7 +47,7 @@ public:
        public:
                Loader(SequenceTemplate &, Collection &);
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void clear();
                void effect(const std::string &);
@@ -82,7 +82,7 @@ public:
                public:
                        Loader(Step &, Collection &);
                private:
-                       virtual void init_actions();
+                       void init_actions() override;
 
                public:
                        void set_inline_base_name(const std::string &);
@@ -119,7 +119,7 @@ private:
        public:
                ClearLoader(SequenceTemplate &);
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void color(float, float, float, float);
                void depth(float);
@@ -134,7 +134,7 @@ private:
        public:
                SequenceLoader(Renderable &);
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void renderable(const std::string &, const std::string &);
        };
index f78994c64797197aacef6ecf3a600953f820b628..dbb53095faf1959c20c91cbe21cba573b79e5575 100644 (file)
@@ -18,7 +18,7 @@ public:
        UvSphereBuilder(float, unsigned, unsigned = 0);
 
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 };
 
 
@@ -40,7 +40,7 @@ private:
 
 public:
        using GeometryBuilder::build;
-       virtual void build(PrimitiveBuilder &) const;
+       void build(PrimitiveBuilder &) const override;
 
 private:
        unsigned edge_vertex(unsigned, unsigned) const;
index 19792980d4a90dc78de773c725f08f2b7fc7b997..56e12637d93a9e5773e88b28e91af825c9d30dde 100644 (file)
@@ -21,7 +21,7 @@ public:
        VertexArrayBuilder(VertexArray &);
 
 private:
-       virtual void vertex_(const Vector4 &);
+       void vertex_(const Vector4 &) override;
 
        template<typename T>
        void store_attribute(char *, const Vector4 &, bool, unsigned);
index 88ed613a5a5ffb64ee823d9e2ddb2f936ef2234a..0bd176d0928652a413d7cb0371680b456204f1fd 100644 (file)
@@ -74,9 +74,9 @@ public:
 
 private:
        void append_index(unsigned);
-       virtual std::size_t get_data_size() const { return data.size(); }
-       virtual const void *get_data_pointer() const { return &data[0]; }
-       virtual std::size_t get_alignment() const { return get_index_size(); }
+       std::size_t get_data_size() const override { return data.size(); }
+       const void *get_data_pointer() const override { return &data[0]; }
+       std::size_t get_alignment() const override { return get_index_size(); }
 public:
        std::size_t get_index_size() const { return get_type_size(index_type); }
        std::size_t size() const { return data.size()/get_index_size(); }
index 70f3ba431249515d786b21e8064e49fde194c0b7..6d517f8500dbc76b44cc4fd3e4c8c6f72c9e7710 100644 (file)
@@ -59,10 +59,10 @@ private:
 
        public:
                AsyncLoader(Mesh &, IO::Seekable &);
-               ~AsyncLoader();
+               ~AsyncLoader() override;
 
-               virtual bool needs_sync() const;
-               virtual bool process();
+               bool needs_sync() const override;
+               bool process() override;
        };
 
        enum BufferMask
@@ -85,7 +85,7 @@ public:
        Mesh() = default;
        Mesh(const VertexFormat &);
        Mesh(Mesh &&);
-       ~Mesh();
+       ~Mesh() override;
 
        /** Sets the vertex format for the mesh.  It cannot be changed once set. */
        void storage(const VertexFormat &);
@@ -124,10 +124,10 @@ private:
        void resize_buffers() const;
 
 public:
-       virtual int get_load_priority() const { return 1; }
-       virtual Resource::AsyncLoader *load(IO::Seekable &, const Resources * = nullptr);
-       virtual std::uint64_t get_data_size() const;
-       virtual void unload();
+       int get_load_priority() const override { return 1; }
+       Resource::AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override;
+       std::uint64_t get_data_size() const override;
+       void unload() override;
 
        void set_debug_name(const std::string &);
 };
index 9e313632284d341b0ceb4fa45fd8fb833930f2fd..9c8d5e0b72f02e8456af9eb25a67e8db39fb66a4 100644 (file)
@@ -75,10 +75,10 @@ private:
        SL::SourceMap source_map;
 
 public:
-       virtual Format get_format() const { return GLSL; }
+       Format get_format() const override { return GLSL; }
 
 private:
-       virtual void compile(SL::Compiler &);
+       void compile(SL::Compiler &) override;
 
 public:
        const std::string &get_prepared_source() const { return prepared_source; }
@@ -264,12 +264,12 @@ private:
        bool specializable = false;
 
 public:
-       virtual Format get_format() const { return SPIR_V; }
+       Format get_format() const override { return SPIR_V; }
 
        /** Loads a SPIR-V binary from a file or other I/O object. */
        void load_code(IO::Base &);
 private:
-       virtual void compile(SL::Compiler &);
+       void compile(SL::Compiler &) override;
        void reflect();
 
 public:
index 892729f0809095b8e6475f2d9a29a4c6352e9e46..a664f9b5e41c5a84d5c126b287a8664f49ede888 100644 (file)
@@ -44,7 +44,7 @@ private:
                SpecializationLoader(std::map<std::string, int> &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void specialize_bool(const std::string &, bool);
                void specialize_int(const std::string &, int);
index 106c478f03cef613661a166b55070bf7647f1c21..777845b24cc8e2aa23f695c3c4b93124fbc5eff9 100644 (file)
@@ -43,7 +43,7 @@ protected:
        private:
                Loader(Texture &, Collection *);
 
-               virtual void finish();
+               void finish() override;
 
        protected:
                void load_external_image(Graphics::Image &, const std::string &);
@@ -66,7 +66,7 @@ public:
                GenericLoader(Collection &c): DynamicObjectLoader<Texture>(&c) { }
 
        protected:
-               virtual const TypeRegistry &get_type_registry() const { return get_texture_registry(); }
+               const TypeRegistry &get_type_registry() const override { return get_texture_registry(); }
        };
 
 protected:
@@ -103,7 +103,7 @@ public:
        on the image's dimensions. */
        virtual void image(const Graphics::Image &, unsigned = 0) = 0;
 
-       virtual std::size_t get_data_size() const { return 0; }
+       std::size_t get_data_size() const override { return 0; }
 
        using TextureBackend::set_debug_name;
 
index 2efa95c3c51d21086482af9188920cf8d4648dbb..03c96b9350e72dd09eff271069d5842ba55d7a20 100644 (file)
@@ -36,14 +36,14 @@ public:
        cannot be changed once set. */
        void storage(PixelFormat, unsigned wd, unsigned lv = 0);
 
-       virtual void image(unsigned level, const void *);
+       void image(unsigned level, const void *) override;
 
        /** Replaces a range of texels in the texture.  Allocated storage must
        exist.  The image data is interpreted according to the storage format and
        the range must be fully inside the selected mipmap level. */
        void sub_image(unsigned level, unsigned x, unsigned wd, const void *);
 
-       virtual void image(const Graphics::Image &, unsigned = 0);
+       void image(const Graphics::Image &, unsigned = 0) override;
 
        unsigned get_width() const { return width; }
 
index 4457dc0a3c3c1803c42e2db2564f74b0c8f05ba4..bf57b22473f65e39e069683bf394bda80884d368 100644 (file)
@@ -24,8 +24,8 @@ public:
        AsyncLoader(Texture2D &, IO::Seekable &);
        ~AsyncLoader();
 
-       virtual bool needs_sync() const;
-       virtual bool process();
+       bool needs_sync() const override;
+       bool process() override;
 };
 
 
index 7256e0591f3ead9e2530268c9255104876c8465c..01b0c9cb73950f3ad0aacbf373f3c60b8309f5c3 100644 (file)
@@ -69,7 +69,7 @@ private:
 public:
        Texture2D() = default;
        Texture2D(Texture2D &&) = default;
-       virtual ~Texture2D();
+       ~Texture2D() override;
 
        /** Sets storage format and dimensions and allocates memory for the texture.
        If lv is zero, a complete mipmap pyramid is automatically created.  Storage
@@ -85,7 +85,7 @@ public:
 
        AsyncTransfer sub_image_async(unsigned level, unsigned x, unsigned y, unsigned wd, unsigned ht);
 
-       virtual void image(const Graphics::Image &, unsigned = 0);
+       void image(const Graphics::Image &, unsigned = 0) override;
 
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
@@ -95,7 +95,7 @@ private:
        LinAl::Vector<unsigned, 2> get_level_size(unsigned) const;
 
 public:
-       virtual Resource::AsyncLoader *load(IO::Seekable &, const Resources * = nullptr);
+       Resource::AsyncLoader *load(IO::Seekable &, const Resources * = nullptr) override;
 };
 
 } // namespace GL
index 5c515111c4129365caaefb12eb9f659fac88e6d0..ad8c8c5c8dd3b220c195be92232ba127b0868297 100644 (file)
@@ -29,8 +29,8 @@ public:
        for the texture. */
        void storage(PixelFormat, unsigned wd, unsigned ht, unsigned sm);
 
-       virtual void image(unsigned, const void *);
-       virtual void image(const Graphics::Image &, unsigned = 0);
+       void image(unsigned, const void *) override;
+       void image(const Graphics::Image &, unsigned = 0) override;
 
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
index be1a0574810ade4827fd62472063294bc25eb060..7981c2d378fda05c29f10d3b530418c386821fe3 100644 (file)
@@ -45,7 +45,7 @@ public:
        /** Replaces contents of an entire mipmap level.  Allocated storage must
        exist.  The image data is interpreted according to the storage format and
        must have size matching the selected mipmap level. */
-       void image(unsigned level, const void *);
+       void image(unsigned level, const void *) override;
 
        /** Replaces a cuboid-shaped region of the texture.  Allocated storage must
        exist.  The image data is interpreted according to the storage format and
@@ -56,7 +56,7 @@ public:
        stack of square layers and its height must be divisible by its width.  If
        storage has not been allocated yet, it will be set to match the image.
        Otherwise the image must be compatible with the existing storage. */
-       virtual void image(const Graphics::Image &, unsigned = 0);
+       void image(const Graphics::Image &, unsigned = 0) override;
 
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
index a3bdf1387597e7c3496bf051795e133539b494d5..1abc763dc105e6c168b8d54ba72329b833aa91ea 100644 (file)
@@ -59,7 +59,7 @@ public:
        cannot be changed once set. */
        void storage(PixelFormat, unsigned size, unsigned lv = 0);
 
-       virtual void image(unsigned, const void *);
+       void image(unsigned, const void *) override;
 
        /** Replaces contents of a single face.  Allocated storage must exist.  The
        image data is interpreted according to the storage format and must have size
@@ -77,7 +77,7 @@ public:
        stack of square layers and its height must be six times its width.  If
        storage has not been allocated yet, it will be set to match the image.
        Otherwise the image must be compatible with the existing storage. */
-       virtual void image(const Graphics::Image &, unsigned = 0);
+       void image(const Graphics::Image &, unsigned = 0) override;
 
        unsigned get_size() const { return size; }
 private:
index c759d852b869b0c90da9467da537eeb2d8128d3e..a869c1a806017d244ae4ffd3a2b0452d63a6357d 100644 (file)
@@ -29,10 +29,10 @@ private:
 public:
        UniformBlock(const ReflectData::BlockInfo &);
 
-       virtual std::size_t get_data_size() const { return data.size(); }
-       virtual const void *get_data_pointer() const { return &data[0]; }
+       std::size_t get_data_size() const override { return data.size(); }
+       const void *get_data_pointer() const override { return &data[0]; }
 private:
-       virtual std::size_t get_alignment() const;
+       std::size_t get_alignment() const override;
 
 public:
        void store(const ReflectData::UniformInfo &, std::size_t, const void *);
index c146f9b7f66ee1bf59374c47299e98e1ab64e1c3..1dd312a2a2b2c11dc920ccc081abd5fb333332da 100644 (file)
@@ -65,8 +65,8 @@ public:
        dirty. */
        char *modify(std::size_t);
 private:
-       virtual std::size_t get_data_size() const;
-       virtual const void *get_data_pointer() const { return &data[0]; }
+       std::size_t get_data_size() const override;
+       const void *get_data_pointer() const override { return &data[0]; }
 
 public:
        std::size_t size() const { return data.size()/stride; }
index 255f2d82102fd37e852b6ec1479d4e6a2ad7f69e..bdadc94ee6fd8ca12d1331ca42a28eecc5e9a353 100644 (file)
@@ -32,7 +32,7 @@ public:
                float darkness = 1.0f;
                float edge_depth_threshold = 0.1f;
 
-               virtual AmbientOcclusion *create(unsigned, unsigned) const;
+               AmbientOcclusion *create(unsigned, unsigned) const override;
        };
 
 private:
@@ -60,9 +60,9 @@ public:
 
        void set_darkness(float);
 
-       virtual void render(Renderer &, const Texture2D &, const Texture2D &);
+       void render(Renderer &, const Texture2D &, const Texture2D &) override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index ef5a8600aa7612e8f17d4840face9ba3684ed8cf..51299a977e5ac977fa0d0b58779c3619fcfe0c0f 100644 (file)
@@ -32,7 +32,7 @@ public:
                float radius = 2.0f;
                float strength = 0.2f;
 
-               virtual Bloom *create(unsigned, unsigned) const;
+               Bloom *create(unsigned, unsigned) const override;
        };
 
 private:
@@ -47,7 +47,7 @@ private:
 
 public:
        Bloom(unsigned, unsigned);
-       ~Bloom();
+       ~Bloom() override;
 
        /** Sets the Ïƒ value of the gaussian blur.  Values much larger than 4.0 are
        likely to cause artifacts. */
@@ -57,9 +57,9 @@ public:
        values mean more blurriness. */
        void set_strength(float);
 
-       virtual void render(Renderer &, const Texture2D &, const Texture2D &);
+       void render(Renderer &, const Texture2D &, const Texture2D &) override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index 501eae10582cf592f1208754b9048e4cfc9de64f..8732c5dfdb138f97e3109228890ea87023cd6ec1 100644 (file)
@@ -43,7 +43,7 @@ public:
                float gamma = 1.0f;
                bool srgb = false;
 
-               virtual ColorCurve *create(unsigned, unsigned) const;
+               ColorCurve *create(unsigned, unsigned) const override;
        };
 
 private:
@@ -77,9 +77,9 @@ public:
        /// Sets output mapping to linear.  This is equivalent to set_gamma(1).
        void set_linear();
 
-       virtual void render(Renderer &, const Texture2D &, const Texture2D &);
+       void render(Renderer &, const Texture2D &, const Texture2D &) override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index 2d74d7472986d0e1426f783373fcba0aa00cedb5..4d2d1839020b17efd9212dfee5e85701b9c34710 100644 (file)
@@ -34,7 +34,7 @@ public:
                public:
                        Loader(Template &, Collection &);
                protected:
-                       virtual void init_actions();
+                       void init_actions() override;
 
                private:
                        void enable_for_method(const std::string &);
@@ -56,17 +56,17 @@ protected:
 protected:
        Effect(Renderable &);
 public:
-       virtual ~Effect() { }
+       ~Effect() override { }
 
        void enable_for_method(Tag);
        void disable_for_method(Tag);
        bool is_enabled_for_method(Tag) const;
 
-       virtual const Matrix *get_matrix() const { return content.get_matrix(); }
-       virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return content.get_bounding_sphere(); }
+       const Matrix *get_matrix() const override { return content.get_matrix(); }
+       const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const override { return content.get_bounding_sphere(); }
 
-       virtual void setup_frame(Renderer &r) { content.setup_frame(r); }
-       virtual void finish_frame() { content.finish_frame(); }
+       void setup_frame(Renderer &r) override { content.setup_frame(r); }
+       void finish_frame() override { content.finish_frame(); }
 
        virtual void set_debug_name(const std::string &) = 0;
 };
index 4f1f544b4c4dcbea422218016fa97a8bec9bb6c7..5c48780f485483954bc1cf58c3cb53d270a154fc 100644 (file)
@@ -41,7 +41,7 @@ public:
                public:
                        Loader(Template &, Collection &);
                private:
-                       virtual void init_actions();
+                       void init_actions() override;
 
                        void fixed_position(float, float, float);
                };
@@ -55,7 +55,7 @@ public:
                float near_clip = 0.1f;
                float far_clip = 100.0f;
 
-               virtual EnvironmentMap *create(const std::map<std::string, Renderable *> &) const;
+               EnvironmentMap *create(const std::map<std::string, Renderable *> &) const override;
        };
 
 protected:
@@ -110,12 +110,12 @@ public:
        /** Request that the environment map is updated on the next frame. */
        void queue_update();
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index a4767b829da398625f3b26458a6ab272bec79af2..93963b52e5f196aa41bac2982a4f1547f080d347 100644 (file)
@@ -45,7 +45,7 @@ public:
                public:
                        Loader(Template &, Collection &);
                private:
-                       virtual void init_actions();
+                       void init_actions() override;
 
                        void light(const std::string &);
                        void size_square(unsigned);
@@ -62,7 +62,7 @@ public:
                        public:
                                Loader(ShadowedLight &);
                        private:
-                               virtual void init_actions();
+                               void init_actions() override;
                        };
 
                        const Light *light = nullptr;
@@ -79,7 +79,7 @@ public:
                float depth_bias = 4.0f;
                float darkness = 1.0f;
 
-               virtual ShadowMap *create(const std::map<std::string, Renderable *> &) const;
+               ShadowMap *create(const std::map<std::string, Renderable *> &) const override;
        };
 
 private:
@@ -163,12 +163,12 @@ public:
 
        const Texture2D &get_depth_texture() const { return depth_buf; }
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index 2b886d1c382ceb2000a3cbfc32692e376e059faf..043ce74c6b0b95e70b7aa1063224d1db10cf3af9 100644 (file)
@@ -56,12 +56,12 @@ public:
                public:
                        Loader(Template &, Collection &);
                private:
-                       virtual void init_actions();
+                       void init_actions() override;
                };
 
                DirectionalLight *sun = nullptr;
 
-               virtual Sky *create(const std::map<std::string, Renderable *> &) const;
+               Sky *create(const std::map<std::string, Renderable *> &) const override;
        };
 
 private:
@@ -89,11 +89,11 @@ public:
 
        Color get_transmittance(const Vector3 &);
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
+       void render(Renderer &, Tag = Tag()) const override;
 
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 };
 
 } // namespace GL
index f347aca5b3250578190ffe4930bee63e5cda77a9..4e3b5859ecc75f56b2838d03c5e54b9571ce9d10 100644 (file)
@@ -73,31 +73,31 @@ private:
        template<typename T>
        typename T::const_iterator increment(typename T::const_iterator &, const T &);
 
-       virtual void visit(Block &);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(ExpressionStatement &);
-       virtual void visit(Import &);
-       virtual void visit(Precision &);
-       virtual void visit(Layout &);
-       virtual void visit(InterfaceLayout &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Passthrough &);
-       virtual void visit(Return &);
-       virtual void visit(Jump &);
+       void visit(Block &) override;
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(ExpressionStatement &) override;
+       void visit(Import &) override;
+       void visit(Precision &) override;
+       void visit(Layout &) override;
+       void visit(InterfaceLayout &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Passthrough &) override;
+       void visit(Return &) override;
+       void visit(Jump &) override;
 };
 
 } // namespace SL
index 45a1bdaacd7df3169269851d429f99a58947cd5f..fcacf774a315125954a1bb67e207c40128e3c945 100644 (file)
@@ -18,8 +18,8 @@ public:
        void apply(Stage &s) { s.content.visit(*this); }
 
 private:
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 /** Assigns location and binding layout qualifiers to interface variables and
@@ -56,8 +56,8 @@ private:
        void bind_uniform(RefPtr<Layout> &, const std::string &, unsigned);
 
        bool visit_uniform(const std::string &, RefPtr<Layout> &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &) { }
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override { }
 };
 
 /**
@@ -79,13 +79,13 @@ public:
 private:
        NodePtr<Statement> create_conversion_statement();
 
-       virtual void visit(Block &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(Assignment &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(Block &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(Assignment &) override;
+       void visit(FunctionCall &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Generates default precision declarations or removes precision declarations
@@ -102,9 +102,9 @@ public:
        void apply(Stage &);
 
 private:
-       virtual void visit(Block &);
-       virtual void visit(Precision &);
-       virtual void visit(VariableDeclaration &);
+       void visit(Block &) override;
+       void visit(Precision &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 /** Base class for feature converters. */
@@ -141,19 +141,19 @@ private:
 public:
        void apply(Stage &s, const Features &f) { FeatureConverter::apply(s, f); }
 private:
-       virtual void apply();
+       void apply() override;
 
-       virtual void visit(Block &);
-       virtual void visit(RefPtr<Expression> &);
+       void visit(Block &) override;
+       void visit(RefPtr<Expression> &) override;
        bool supports_stage(Stage::Type) const;
        bool supports_unified_interface_syntax() const;
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Assignment &);
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Assignment &) override;
        bool supports_unified_sampling_functions() const;
-       virtual void visit(FunctionCall &);
+       void visit(FunctionCall &) override;
        bool supports_interface_blocks(const std::string &) const;
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableDeclaration &) override;
 };
 
 /** Converts qualifiers on variables and blocksto match a particular set of
@@ -163,7 +163,7 @@ class QualifierConverter: private FeatureConverter
 public:
        void apply(Stage &s, const Features &f) { FeatureConverter::apply(s, f); }
 private:
-       virtual void apply();
+       void apply() override;
 
        bool supports_interface_layouts() const;
        bool supports_stage_interface_layouts() const;
@@ -172,7 +172,7 @@ private:
        bool supports_uniform_location() const;
        bool supports_binding() const;
        bool supports_interface_block_location() const;
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableDeclaration &) override;
 };
 
 } // namespace SL
index 1eddfb162db88a834113489664539f80a43d8350..e43c5bd665b5c8e223a9542ff47be822135a1fca 100644 (file)
@@ -23,7 +23,7 @@ public:
        void apply(Module &, const Features &);
 
 private:
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableDeclaration &) override;
 };
 
 /** Materializes implicitly declared interfaces.
@@ -54,13 +54,13 @@ public:
 private:
        static std::string get_out_prefix(Stage::Type);
        std::string change_prefix(const std::string &, const std::string &) const;
-       virtual void visit(Block &);
+       void visit(Block &) override;
        VariableDeclaration *generate_interface(VariableDeclaration &, const std::string &, const std::string &);
        ExpressionStatement &insert_assignment(const std::string &, Expression *);
-       virtual void visit(VariableReference &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Passthrough &);
+       void visit(VariableReference &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Passthrough &) override;
 };
 
 class LayoutDefaulter: private TraversingVisitor
@@ -74,7 +74,7 @@ public:
        void apply(Stage &);
 
 private:
-       virtual void visit(InterfaceLayout &);
+       void visit(InterfaceLayout &) override;
 };
 
 /**
@@ -92,15 +92,15 @@ public:
        void apply(Stage &);
 
 private:
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression&);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(InterfaceLayout &);
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression&) override;
+       void visit(BinaryExpression &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(InterfaceLayout &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 } // namespace SL
index 5f55e10c970f9f3d269c7ee036d4558626a0d419..30bc17e94bddf46ecb5b86142d729a8cd4fce73f 100644 (file)
@@ -20,7 +20,7 @@ public:
        void apply(Stage &, const std::map<std::string, int> &);
 
 private:
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableDeclaration &) override;
 };
 
 /** Finds functions which are candidates for inlining.  Currently this means
@@ -38,11 +38,11 @@ public:
        std::set<FunctionDeclaration *> apply(Stage &s) { s.content.visit(*this); return inlineable; }
 
 private:
-       virtual void visit(FunctionCall &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Return &);
+       void visit(FunctionCall &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Return &) override;
 };
 
 /** Injects statements from one function into another.  Local variables are
@@ -70,10 +70,10 @@ public:
        std::string apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
 
 private:
-       virtual void visit(VariableReference &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(Return &);
+       void visit(VariableReference &) override;
+       void visit(FunctionCall &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(Return &) override;
 };
 
 /** Inlines functions.  Internally uses InlineableFunctionLocator to find
@@ -94,11 +94,11 @@ public:
        bool apply(Stage &);
 
 private:
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(Block &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Iteration &);
+       void visit(RefPtr<Expression> &) override;
+       void visit(Block &) override;
+       void visit(FunctionCall &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Iteration &) override;
 };
 
 /** Inlines variables into expressions.  Variables with trivial values (those
@@ -138,17 +138,17 @@ public:
        bool apply(Stage &);
 
 private:
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(Iteration &);
+       void visit(RefPtr<Expression> &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(Iteration &) override;
 };
 
 /**
@@ -186,15 +186,15 @@ public:
        bool apply(Stage &);
 
 private:
-       virtual void visit(Block &);
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(VariableReference &);
+       void visit(Block &) override;
+       void visit(RefPtr<Expression> &) override;
+       void visit(VariableReference &) override;
        void visit_composite(RefPtr<Expression> &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(StructDeclaration &) { }
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(MemberAccess &) override;
+       void visit(BinaryExpression &) override;
+       void visit(StructDeclaration &) override { }
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Replaces expressions consisting entirely of literals with the results of
@@ -227,18 +227,18 @@ private:
        void convert_to_result(const Variant &);
        void set_result(const Variant &, bool = false);
 
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(Iteration &);
+       void visit(RefPtr<Expression> &) override;
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(Iteration &) override;
 };
 
 /** Removes conditional statements and loops where the condition can be
@@ -265,14 +265,14 @@ public:
 private:
        ConstantStatus check_constant_condition(const Expression &);
 
-       virtual void visit(Block &);
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
+       void visit(Block &) override;
+       void visit(RefPtr<Expression> &) override;
+       void visit(UnaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
 };
 
 /** Removes code which is never executed due to flow control statements. */
@@ -286,12 +286,12 @@ public:
        virtual bool apply(Stage &);
 
 private:
-       virtual void visit(Block &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Return &) { reachable = false; }
-       virtual void visit(Jump &) { reachable = false; }
+       void visit(Block &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Return &) override { reachable = false; }
+       void visit(Jump &) override { reachable = false; }
 };
 
 /** Removes types which are not used anywhere. */
@@ -304,12 +304,12 @@ public:
        bool apply(Stage &);
 
 private:
-       virtual void visit(RefPtr<Expression> &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(RefPtr<Expression> &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Removes variable declarations with no references to them.  Assignment
@@ -353,23 +353,23 @@ public:
 
 private:
        void referenced(const Assignment::Target &, Node &);
-       virtual void visit(VariableReference &);
+       void visit(VariableReference &) override;
        void visit_composite(Expression &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
        void record_assignment(const Assignment::Target &, Node &);
-       virtual void visit(ExpressionStatement &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(ExpressionStatement &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
        void merge_variables(const BlockVariableMap &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
 };
 
 /** Removes function declarations with no references to them. */
@@ -383,8 +383,8 @@ public:
        bool apply(Stage &s);
 
 private:
-       virtual void visit(FunctionCall &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(FunctionCall &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 } // namespace SL
index 57abed75af68b50d20b936e4a46c67945a6be11a..70e73c8a40550411800e0d59a1b33cdc064eb462 100644 (file)
@@ -30,30 +30,30 @@ private:
        void append(char);
        void set_source(unsigned, unsigned);
 
-       virtual void visit(Block &);
+       void visit(Block &) override;
        void visit_expression(Expression &, const Operator *, bool);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(ExpressionStatement &);
-       virtual void visit(Import &);
-       virtual void visit(Precision &);
-       virtual void visit(Layout &);
-       virtual void visit(InterfaceLayout &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Passthrough &);
-       virtual void visit(Return &);
-       virtual void visit(Jump &);
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(ExpressionStatement &) override;
+       void visit(Import &) override;
+       void visit(Precision &) override;
+       void visit(Layout &) override;
+       void visit(InterfaceLayout &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Passthrough &) override;
+       void visit(Return &) override;
+       void visit(Jump &) override;
 };
 
 } // namespace SL
index 13528c0d290cbcc9320a3748827d9d06b2193095..59b5be231e2fbd2af58cb615923c8e90b355abd3 100644 (file)
@@ -30,16 +30,16 @@ private:
        void compare(Node &, Node &);
        template<typename T>
        T *multi_visit(T &);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 /** Determines the number of interface locations required by a variable. */
@@ -52,10 +52,10 @@ public:
        unsigned apply(VariableDeclaration &v) { v.visit(*this); return r_count; }
 
 private:
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 /** Determines the size and alignment of a variable or a type, in bytes. */
@@ -80,9 +80,9 @@ public:
        Result apply(TypeDeclaration &t) { t.visit(*this); return Result(r_size, r_alignment); }
 
 private:
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(BasicTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
 };
 
 /** Collects dependencies of a function.  This includes global variables,
@@ -98,10 +98,10 @@ public:
        std::set<Node *> apply(FunctionDeclaration &);
 
 private:
-       virtual void visit(VariableReference &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(VariableReference &) override;
+       void visit(FunctionCall &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 class AssignmentCollector: private TraversingVisitor
@@ -114,10 +114,10 @@ public:
        std::set<Node *> apply(Node &);
 
 private:
-       virtual void visit(VariableReference &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
+       void visit(VariableReference &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
 };
 
 } // namespace SL
index 43326cfb2ba52cd51549b538f6d20d82ab3c675d..5cb77c19e7c0e4551105d71dff0c24f1bd2e41cd 100644 (file)
@@ -21,7 +21,7 @@ public:
        bool apply(Stage &s) { r_any_resolved = false; s.content.visit(*this); return r_any_resolved; }
 
 private:
-       virtual void enter(Block &);
+       void enter(Block &) override;
 };
 
 /** Resolves types of variables and base types of other types. */
@@ -44,12 +44,12 @@ private:
        TypeDeclaration *get_or_create_array_type(TypeDeclaration &);
        TypeDeclaration *get_or_create_image_type(ImageTypeDeclaration &, const std::string &);
        void resolve_type(TypeDeclaration *&, const std::string &, bool, const Layout * = nullptr);
-       virtual void visit(Block &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(Block &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Resolves variable references. */
@@ -69,17 +69,17 @@ public:
        bool apply(Stage &);
 
 private:
-       virtual void enter(Block &);
-       virtual void visit(RefPtr<Expression> &);
+       void enter(Block &) override;
+       void visit(RefPtr<Expression> &) override;
        void check_assignment_target(VariableDeclaration *);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
        void merge_layouts(Layout &, const Layout &);
        void redeclare_builtin(VariableDeclaration &, VariableDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(VariableDeclaration &) override;
 };
 
 /** Resolves types and lvalueness of expressions. */
@@ -118,22 +118,22 @@ private:
        bool truncate_vector(RefPtr<Expression> &, unsigned);
        void resolve(Expression &, TypeDeclaration *, bool);
 
-       virtual void visit(Block &);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
+       void visit(Block &) override;
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
        void visit(BinaryExpression &, bool);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
        void visit_constructor(FunctionCall &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Return &);
+       void visit(FunctionCall &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Return &) override;
        using TraversingVisitor::visit;
 };
 
@@ -151,8 +151,8 @@ public:
 private:
        static bool can_convert_arguments(const FunctionCall &, const FunctionDeclaration &);
 
-       virtual void visit(FunctionCall &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(FunctionCall &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 } // namespace SL
index af30212ed048787d10b050ba2df05a86073c2902..8436cf14c5898513618f93978da469127a3b8ed2 100644 (file)
@@ -137,19 +137,19 @@ private:
        void write_deconstruct(Id, Id, Id *, unsigned);
        Id write_construct(Id, const Id *, unsigned);
 
-       virtual void visit(Block &);
-       virtual void visit(Literal &);
-       virtual void visit(VariableReference &);
+       void visit(Block &) override;
+       void visit(Literal &) override;
+       void visit(VariableReference &) override;
        void generate_composite_access(TypeDeclaration &);
        void visit_composite(Expression &, unsigned, TypeDeclaration &);
        void visit_isolated(Expression &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
        void visit_constructor(FunctionCall &, const std::vector<Id> &, bool);
        void visit_builtin_matrix_comp_mult(FunctionCall &, const std::vector<Id> &);
        void visit_builtin_texture_query(FunctionCall &, const std::vector<Id> &);
@@ -157,20 +157,20 @@ private:
        void visit_builtin_texture_fetch(FunctionCall &, const std::vector<Id> &);
        void visit_builtin_texture_store(FunctionCall &, const std::vector<Id> &);
        void visit_builtin_interpolate(FunctionCall &, const std::vector<Id> &);
-       virtual void visit(ExpressionStatement &);
-       virtual void visit(InterfaceLayout &);
+       void visit(ExpressionStatement &) override;
+       void visit(InterfaceLayout &) override;
        bool check_duplicate_type(TypeDeclaration &);
        bool check_standard_type(BasicTypeDeclaration &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
        void visit_entry_point(FunctionDeclaration &, Id);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Return &);
-       virtual void visit(Jump &);
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Return &) override;
+       void visit(Jump &) override;
 };
 
 } // namespace SL
index b3932c6fc8d9c05bfe7d52e60c52161f4ef47f86..03c5b80d36d6e859fed683e082f2016b2aa45a4f 100644 (file)
@@ -119,7 +119,7 @@ struct FunctionDeclaration;
 
 struct Statement: Node
 {
-       virtual Statement *clone() const = 0;
+       Statement *clone() const override = 0;
 };
 
 struct Block: Node
@@ -133,8 +133,8 @@ struct Block: Node
        Block() = default;
        Block(const Block &);
 
-       virtual Block *clone() const { return new Block(*this); }
-       virtual void visit(NodeVisitor &);
+       Block *clone() const override { return new Block(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Expression: Node
@@ -144,7 +144,7 @@ struct Expression: Node
        TypeDeclaration *type = nullptr;
        bool lvalue = false;
 
-       virtual Expression *clone() const = 0;
+       Expression *clone() const override = 0;
 };
 
 struct Literal: Expression
@@ -152,8 +152,8 @@ struct Literal: Expression
        std::string token;
        Variant value;
 
-       virtual Literal *clone() const { return new Literal(*this); }
-       virtual void visit(NodeVisitor &);
+       Literal *clone() const override { return new Literal(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct VariableReference: Expression
@@ -165,8 +165,8 @@ struct VariableReference: Expression
        VariableReference() = default;
        VariableReference(const VariableReference &);
 
-       virtual VariableReference *clone() const { return new VariableReference(*this); }
-       virtual void visit(NodeVisitor &);
+       VariableReference *clone() const override { return new VariableReference(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct MemberAccess: Expression
@@ -180,8 +180,8 @@ struct MemberAccess: Expression
        MemberAccess() = default;
        MemberAccess(const MemberAccess &);
 
-       virtual MemberAccess *clone() const { return new MemberAccess(*this); }
-       virtual void visit(NodeVisitor &);
+       MemberAccess *clone() const override { return new MemberAccess(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Swizzle: Expression
@@ -191,16 +191,16 @@ struct Swizzle: Expression
        unsigned count = 0;
        std::uint8_t components[4] = { 0, 0, 0, 0 };
 
-       virtual Swizzle *clone() const { return new Swizzle(*this); }
-       virtual void visit(NodeVisitor &);
+       Swizzle *clone() const override { return new Swizzle(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct UnaryExpression: Expression
 {
        NodePtr<Expression> expression;
 
-       virtual UnaryExpression *clone() const { return new UnaryExpression(*this); }
-       virtual void visit(NodeVisitor &);
+       UnaryExpression *clone() const override { return new UnaryExpression(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct BinaryExpression: Expression
@@ -208,8 +208,8 @@ struct BinaryExpression: Expression
        NodePtr<Expression> left;
        NodePtr<Expression> right;
 
-       virtual BinaryExpression *clone() const { return new BinaryExpression(*this); }
-       virtual void visit(NodeVisitor &);
+       BinaryExpression *clone() const override { return new BinaryExpression(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Assignment: BinaryExpression
@@ -239,8 +239,8 @@ struct Assignment: BinaryExpression
        Assignment() = default;
        Assignment(const Assignment &);
 
-       virtual Assignment *clone() const { return new Assignment(*this); }
-       virtual void visit(NodeVisitor &);
+       Assignment *clone() const override { return new Assignment(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct TernaryExpression: Expression
@@ -249,8 +249,8 @@ struct TernaryExpression: Expression
        NodePtr<Expression> true_expr;
        NodePtr<Expression> false_expr;
 
-       virtual TernaryExpression *clone() const { return new TernaryExpression(*this); }
-       virtual void visit(NodeVisitor &);
+       TernaryExpression *clone() const override { return new TernaryExpression(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct FunctionCall: Expression
@@ -264,24 +264,24 @@ struct FunctionCall: Expression
        FunctionCall() = default;
        FunctionCall(const FunctionCall &);
 
-       virtual FunctionCall *clone() const { return new FunctionCall(*this); }
-       virtual void visit(NodeVisitor &);
+       FunctionCall *clone() const override { return new FunctionCall(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct ExpressionStatement: Statement
 {
        NodePtr<Expression> expression;
 
-       virtual ExpressionStatement *clone() const { return new ExpressionStatement(*this); }
-       virtual void visit(NodeVisitor &);
+       ExpressionStatement *clone() const override { return new ExpressionStatement(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Import: Statement
 {
        std::string module;
 
-       virtual Import *clone() const { return new Import(*this); }
-       virtual void visit(NodeVisitor &);
+       Import *clone() const override { return new Import(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Precision: Statement
@@ -289,8 +289,8 @@ struct Precision: Statement
        std::string precision;
        std::string type;
 
-       virtual Precision *clone() const { return new Precision(*this); }
-       virtual void visit(NodeVisitor &);
+       Precision *clone() const override { return new Precision(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Layout: Node
@@ -307,8 +307,8 @@ struct Layout: Node
 
        std::vector<Qualifier> qualifiers;
 
-       virtual Layout *clone() const { return new Layout(*this); }
-       virtual void visit(NodeVisitor &);
+       Layout *clone() const override { return new Layout(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct InterfaceLayout: Statement
@@ -316,15 +316,15 @@ struct InterfaceLayout: Statement
        std::string interface;
        Layout layout;
 
-       virtual InterfaceLayout *clone() const { return new InterfaceLayout(*this); }
-       virtual void visit(NodeVisitor &);
+       InterfaceLayout *clone() const override { return new InterfaceLayout(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct TypeDeclaration: Statement
 {
        std::string name;
 
-       virtual TypeDeclaration *clone() const = 0;
+       TypeDeclaration *clone() const override = 0;
 };
 
 struct BasicTypeDeclaration: TypeDeclaration
@@ -352,8 +352,8 @@ struct BasicTypeDeclaration: TypeDeclaration
        BasicTypeDeclaration() = default;
        BasicTypeDeclaration(const BasicTypeDeclaration &);
 
-       virtual BasicTypeDeclaration *clone() const { return new BasicTypeDeclaration(*this); }
-       virtual void visit(NodeVisitor &);
+       BasicTypeDeclaration *clone() const override { return new BasicTypeDeclaration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct ImageTypeDeclaration: TypeDeclaration
@@ -377,8 +377,8 @@ struct ImageTypeDeclaration: TypeDeclaration
        TypeDeclaration *base_type = nullptr;
        ImageTypeDeclaration *base_image = nullptr;
 
-       virtual ImageTypeDeclaration *clone() const { return new ImageTypeDeclaration(*this); }
-       virtual void visit(NodeVisitor &);
+       ImageTypeDeclaration *clone() const override { return new ImageTypeDeclaration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct StructDeclaration: TypeDeclaration
@@ -392,8 +392,8 @@ struct StructDeclaration: TypeDeclaration
        StructDeclaration();
        StructDeclaration(const StructDeclaration &);
 
-       virtual StructDeclaration *clone() const { return new StructDeclaration(*this); }
-       virtual void visit(NodeVisitor &);
+       StructDeclaration *clone() const override { return new StructDeclaration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct VariableDeclaration: Statement
@@ -416,10 +416,10 @@ struct VariableDeclaration: Statement
 
        VariableDeclaration() = default;
        VariableDeclaration(const VariableDeclaration &);
-       ~VariableDeclaration();
+       ~VariableDeclaration() override;
 
-       virtual VariableDeclaration *clone() const { return new VariableDeclaration(*this); }
-       virtual void visit(NodeVisitor &);
+       VariableDeclaration *clone() const override { return new VariableDeclaration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct FunctionDeclaration: Statement
@@ -438,8 +438,8 @@ struct FunctionDeclaration: Statement
        FunctionDeclaration() = default;
        FunctionDeclaration(const FunctionDeclaration &);
 
-       virtual FunctionDeclaration *clone() const { return new FunctionDeclaration(*this); }
-       virtual void visit(NodeVisitor &);
+       FunctionDeclaration *clone() const override { return new FunctionDeclaration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Conditional: Statement
@@ -448,8 +448,8 @@ struct Conditional: Statement
        Block body;
        Block else_body;
 
-       virtual Conditional *clone() const { return new Conditional(*this); }
-       virtual void visit(NodeVisitor &);
+       Conditional *clone() const override { return new Conditional(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Iteration: Statement
@@ -459,32 +459,32 @@ struct Iteration: Statement
        NodePtr<Expression> loop_expression;
        Block body;
 
-       virtual Iteration *clone() const { return new Iteration(*this); }
-       virtual void visit(NodeVisitor &);
+       Iteration *clone() const override { return new Iteration(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Passthrough: Statement
 {
        NodePtr<Expression> subscript;
 
-       virtual Passthrough *clone() const { return new Passthrough(*this); }
-       virtual void visit(NodeVisitor &);
+       Passthrough *clone() const override { return new Passthrough(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Return: Statement
 {
        NodePtr<Expression> expression;
 
-       virtual Return *clone() const { return new Return(*this); }
-       virtual void visit(NodeVisitor &);
+       Return *clone() const override { return new Return(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Jump: Statement
 {
        std::string keyword;
 
-       virtual Jump *clone() const { return new Jump(*this); }
-       virtual void visit(NodeVisitor &);
+       Jump *clone() const override { return new Jump(*this); }
+       void visit(NodeVisitor &) override;
 };
 
 struct Stage
index da1ed1c32231c15ff3361c24ede6bfeb9897969c..075f92f8945462c319246656e8cae281e35ca97e 100644 (file)
@@ -55,13 +55,13 @@ public:
 private:
        static const char *describe_variable(ScopeType);
 
-       virtual void visit(Layout &);
-       virtual void visit(InterfaceLayout &);
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(Layout &) override;
+       void visit(InterfaceLayout &) override;
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Verifies that identifiers are unique or, in the case of functions, are
@@ -86,11 +86,11 @@ private:
        void record_definition(const std::string &, Statement &);
 
        virtual void visit(TypeDeclaration &);
-       virtual void visit(BasicTypeDeclaration &t) { visit(static_cast<TypeDeclaration &>(t)); }
-       virtual void visit(ImageTypeDeclaration &t) { visit(static_cast<TypeDeclaration &>(t)); }
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(BasicTypeDeclaration &t) override { visit(static_cast<TypeDeclaration &>(t)); }
+       void visit(ImageTypeDeclaration &t) override { visit(static_cast<TypeDeclaration &>(t)); }
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
        using Validator::visit;
 };
 
@@ -101,13 +101,13 @@ public:
        void apply(Stage &s) { stage = &s; s.content.visit(*this); }
 
 private:
-       virtual void visit(BasicTypeDeclaration &);
-       virtual void visit(ImageTypeDeclaration &);
-       virtual void visit(VariableReference &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
+       void visit(BasicTypeDeclaration &) override;
+       void visit(ImageTypeDeclaration &) override;
+       void visit(VariableReference &) override;
+       void visit(MemberAccess &) override;
+       void visit(FunctionCall &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
 };
 
 /** Verifies that expressions are valid.  In most cases an invalid expression
@@ -130,18 +130,18 @@ public:
        void apply(Stage &s) { stage = &s; s.content.visit(*this); }
 
 private:
-       virtual void visit(VariableReference &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Return &);
+       void visit(VariableReference &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Return &) override;
 };
 
 /** Verifies flow control constructs.  Functions returning non-void must have
@@ -155,12 +155,12 @@ public:
        void apply(Stage &s) { stage = &s; s.content.visit(*this); }
 
 private:
-       virtual void visit(Block &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Return &) { reachable = false; }
-       virtual void visit(Jump &) { reachable = false; }
+       void visit(Block &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Return &) override { reachable = false; }
+       void visit(Jump &) override { reachable = false; }
 };
 
 /** Verifies that stage input and output interfaces are valid.  Linked
@@ -175,8 +175,8 @@ public:
        void apply(Stage &s) { stage = &s; s.content.visit(*this); }
 
 private:
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &) { }
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override { }
 };
 
 /** Verifies that uniform interfaces are valid across the entire module.
@@ -206,8 +206,8 @@ public:
 private:
        void check_uniform(const Uniform &);
 
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &) { }
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override { }
 };
 
 } // namespace SL
index 9a5aaff75b55e6ac118317038bcb1c3a46a180e8..7cd5cb616ca74629824f8b0ad63aefd72aecb489 100644 (file)
@@ -54,24 +54,24 @@ protected:
 
 public:
        virtual void enter(Block &) { }
-       virtual void visit(Block &);
+       void visit(Block &) override;
        virtual void visit(RefPtr<Expression> &);
-       virtual void visit(MemberAccess &);
-       virtual void visit(Swizzle &);
-       virtual void visit(UnaryExpression &);
-       virtual void visit(BinaryExpression &);
-       virtual void visit(Assignment &);
-       virtual void visit(TernaryExpression &);
-       virtual void visit(FunctionCall &);
-       virtual void visit(ExpressionStatement &);
-       virtual void visit(InterfaceLayout &);
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Conditional &);
-       virtual void visit(Iteration &);
-       virtual void visit(Passthrough &);
-       virtual void visit(Return &);
+       void visit(MemberAccess &) override;
+       void visit(Swizzle &) override;
+       void visit(UnaryExpression &) override;
+       void visit(BinaryExpression &) override;
+       void visit(Assignment &) override;
+       void visit(TernaryExpression &) override;
+       void visit(FunctionCall &) override;
+       void visit(ExpressionStatement &) override;
+       void visit(InterfaceLayout &) override;
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Conditional &) override;
+       void visit(Iteration &) override;
+       void visit(Passthrough &) override;
+       void visit(Return &) override;
        using NodeVisitor::visit;
 };
 
@@ -89,14 +89,14 @@ private:
        template<typename T>
        void remove_from_map(std::map<std::string, T *> &, const std::string &, T &);
 
-       virtual void visit(Block &);
+       void visit(Block &) override;
        void visit(TypeDeclaration &);
-       virtual void visit(BasicTypeDeclaration &t) { visit(static_cast<TypeDeclaration &>(t)); }
-       virtual void visit(ImageTypeDeclaration &t) { visit(static_cast<TypeDeclaration &>(t)); }
-       virtual void visit(StructDeclaration &);
-       virtual void visit(VariableDeclaration &);
-       virtual void visit(FunctionDeclaration &);
-       virtual void visit(Iteration &);
+       void visit(BasicTypeDeclaration &t) override { visit(static_cast<TypeDeclaration &>(t)); }
+       void visit(ImageTypeDeclaration &t) override { visit(static_cast<TypeDeclaration &>(t)); }
+       void visit(StructDeclaration &) override;
+       void visit(VariableDeclaration &) override;
+       void visit(FunctionDeclaration &) override;
+       void visit(Iteration &) override;
        using TraversingVisitor::visit;
 };
 
@@ -112,7 +112,7 @@ public:
        void apply(Stage &, Node &, const std::set<Node *> &);
 
 private:
-       virtual void visit(Block &);
+       void visit(Block &) override;
 };
 
 } // namespace SL
index b5e04d72aec101af8ad164b7a252561cc335c5b3..60996f69fa1118580dd9c92e625d3daa4c985d79 100644 (file)
@@ -26,7 +26,7 @@ public:
                Loader(BasicMaterial &, Collection &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
        };
 
 private:
@@ -43,11 +43,11 @@ public:
        BasicMaterial();
 
 protected:
-       virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
+       void fill_program_info(std::string &, std::map<std::string, int> &) const override;
 
 public:
-       virtual const Tag *get_texture_tags() const { return texture_tags; }
-       virtual const Texture *get_texture(Tag) const;
+       const Tag *get_texture_tags() const override { return texture_tags; }
+       const Texture *get_texture(Tag) const override;
 
        void set_diffuse(const Color &);
        void set_diffuse_map(const Texture *);
index e1b816f5093c0ad06db26aef5e5e1a97abc7b8a4..0e5baae742210228e0f4a549494eb786bff858d9 100644 (file)
@@ -23,7 +23,7 @@ public:
                Loader(DirectionalLight &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void direction(float, float, float);
        };
@@ -37,7 +37,7 @@ private:
 public:
        /** Sets the light's direction from a matrix.  The negative Z axis is used
        as the direction.  Other axes and translation are ignored. */
-       virtual void set_matrix(const Matrix &);
+       void set_matrix(const Matrix &) override;
 
        void set_direction(const Vector3 &);
 
@@ -48,7 +48,7 @@ public:
        void set_transmittance(const Color &);
 
 protected:
-       virtual void update_shader_data(ProgramData &, const std::string &) const;
+       void update_shader_data(ProgramData &, const std::string &) const override;
 };
 
 } // namespace GL
index 3d7cbcc46268830c98f80aad1b99ad569f449954..72ad748b6f5d73c53d7dc794f30e86ec52e24172 100644 (file)
@@ -30,7 +30,7 @@ protected:
        protected:
                Loader(Light &);
 
-               virtual void init_actions();
+               void init_actions() override;
 
        private:
                void color(float, float, float);
@@ -45,7 +45,7 @@ public:
                GenericLoader(Collection &c): DynamicObjectLoader<Light>(&c) { }
 
        protected:
-               virtual const TypeRegistry &get_type_registry() const { return Light::get_light_registry(); }
+               const TypeRegistry &get_type_registry() const override { return Light::get_light_registry(); }
        };
 
 protected:
@@ -54,7 +54,7 @@ protected:
 
        Light() = default;
 public:
-       virtual ~Light() = default;
+       ~Light() override = default;
 
        /** Sets the color of the light. */
        void set_color(const Color &);
index 84f2f3af7b2b23c6220e4187e6d8724378f066e3..6081965a4552f606c7d16d4fbae3be6607f845b5 100644 (file)
@@ -29,7 +29,7 @@ public:
                Loader(Lighting &, Collection &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void ambient(float, float, float);
                void fog_color(float, float, float);
index f9ae80873a6aa180045c5e758ceba150c52dad51..a1fd9cf949f5f981eeb717b12a4e7bc73c7b02e9 100644 (file)
@@ -25,7 +25,7 @@ private:
        protected:
                Loader(Material &, Collection &);
 
-               virtual void init_actions();
+               void init_actions() override;
 
        private:
                void alpha_cutoff(float);
@@ -70,7 +70,7 @@ public:
                GenericLoader(Collection &c): DynamicObjectLoader<Material>(&c) { }
 
        protected:
-               virtual const TypeRegistry &get_type_registry() const { return get_material_registry(); }
+               const TypeRegistry &get_type_registry() const override { return get_material_registry(); }
        };
 
 protected:
index d21bece3fd1b1dbe253c2efd8e511050be14824c..0ffc52bd28e01c0724e41adecfb404fc8347761b 100644 (file)
@@ -29,7 +29,7 @@ public:
                Loader(PbrMaterial &, Collection &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
        };
        
 private:
@@ -51,12 +51,12 @@ public:
        static const Texture2D &get_or_create_fresnel_lookup();
 
 protected:
-       virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
+       void fill_program_info(std::string &, std::map<std::string, int> &) const override;
 
 public:
-       virtual const Tag *get_texture_tags() const { return texture_tags; }
-       virtual const Texture *get_texture(Tag) const;
-       virtual const Sampler *get_sampler(Tag) const;
+       const Tag *get_texture_tags() const override { return texture_tags; }
+       const Texture *get_texture(Tag) const override;
+       const Sampler *get_sampler(Tag) const override;
 
        void set_base_color(const Color &);
        void set_base_color_map(const Texture *);
index f94c9ca0c374848e81ac97c7c5f7f1891acbb636..96dfbcbb94befe6f0209f28c7c39cbcca25e363e 100644 (file)
@@ -24,7 +24,7 @@ public:
                Loader(PointLight &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void attenuation(float, float, float);
                void position(float, float, float);
@@ -39,7 +39,7 @@ private:
 public:
        /** Sets the light's position from a matrix.  Only the translation part is
        used. */
-       virtual void set_matrix(const Matrix &);
+       void set_matrix(const Matrix &) override;
 
        void set_position(const Vector3 &);
        const Vector3 &get_position();
@@ -51,7 +51,7 @@ public:
        const float *get_attenuation() const { return attenuation; }
 
 protected:
-       virtual void update_shader_data(ProgramData &, const std::string &) const;
+       void update_shader_data(ProgramData &, const std::string &) const override;
 };
 
 } // namespace GL
index e0356b8234ee9c70d2fa093f2139263c3a581a68..14d7541a508caede2036810739bc30100ac024a8 100644 (file)
@@ -37,13 +37,13 @@ public:
        public:
                Loader(RenderMethod &, Collection &);
        private:
-               virtual void init_actions();
+               void init_actions() override;
        
        public:
                void set_inline_base_name(const std::string &);
 
        private:
-               virtual void finish();
+               void finish() override;
 
                void blend();
                void blend_factors(BlendFactor, BlendFactor);
index 040ccf524302a3d7427cd307255696e6921e8ad1..70662837212dc94aa0a372accf09011ee8e1673c 100644 (file)
@@ -25,8 +25,8 @@ public:
                Loader(SplatMaterial &, Collection &);
 
        private:
-               virtual void init_actions();
-               virtual void finish();
+               void init_actions() override;
+               void finish() override;
 
                void map_storage(MapArray SplatMaterial::*, PixelFormat, unsigned, unsigned);
                void sub();
@@ -50,7 +50,7 @@ private:
                        Loader(SubMaterial &);
 
                private:
-                       virtual void init_actions();
+                       void init_actions() override;
 
                        void base_color(float, float, float);
                        void emission(float, float, float);
@@ -97,15 +97,15 @@ private:
 
 public:
        SplatMaterial();
-       ~SplatMaterial();
+       ~SplatMaterial() override;
 
 protected:
-       virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
+       void fill_program_info(std::string &, std::map<std::string, int> &) const override;
 
 public:
-       virtual const Tag *get_texture_tags() const { return texture_tags; }
-       virtual const Texture *get_texture(Tag) const;
-       virtual const Sampler *get_sampler(Tag) const;
+       const Tag *get_texture_tags() const override { return texture_tags; }
+       const Texture *get_texture(Tag) const override;
+       const Sampler *get_sampler(Tag) const override;
 
 private:
        void set_sub_uniforms(unsigned);
@@ -113,7 +113,7 @@ private:
        void upload_sub_map(DataFile::Collection &, unsigned, SubMap SubMaterial::*, MapArray &, const char *);
 
 public:
-       virtual void set_debug_name(const std::string &);
+       void set_debug_name(const std::string &) override;
 private:
        void set_array_debug_names();
 };
index 49d916c139509a89d1462fdefb78f5809b04b476..8656770e4df8aab86952791b56d999e5785bcc8b 100644 (file)
@@ -28,7 +28,7 @@ public:
        public:
                Loader(Technique &, Collection &);
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
        public:
                void set_inline_base_name(const std::string &);
index a89e46ecc1785b857adf5816b7cc4f71b7077af9..ac8dcbf19ddc36a55aacf04024cb7a8c64d96ec4 100644 (file)
@@ -23,7 +23,7 @@ public:
                Loader(UnlitMaterial &, Collection &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
                void texture(const std::string &);
        };
@@ -39,11 +39,11 @@ public:
        UnlitMaterial();
 
 protected:
-       virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
+       void fill_program_info(std::string &, std::map<std::string, int> &) const override;
 
 public:
-       virtual const Tag *get_texture_tags() const { return texture_tags; }
-       virtual const Texture *get_texture(Tag) const;
+       const Tag *get_texture_tags() const override { return texture_tags; }
+       const Texture *get_texture(Tag) const override;
 
        void set_texture(const Texture *);
        void set_color(const Color &);
index c55157b593fa148c86d4f12f71e5c1174e7e2643..333b2cdf441dfc5246675eb0229ecc6a18101571 100644 (file)
@@ -102,7 +102,7 @@ public:
        const Vector3 &get_look_direction() const { return look_dir; }
        const Vector3 &get_up_direction() const { return up_dir; }
 
-       virtual void set_matrix(const Matrix &m) { set_object_matrix(m); }
+       void set_matrix(const Matrix &m) override { set_object_matrix(m); }
 
        /** Sets the position and orientation of the camera from an object matrix. */
        void set_object_matrix(const Matrix &);
index cd7b333b013613b2802b563eee1a75beb390182c..bc89f57000048e954e6ef19bbb4bb0efbd076ec4 100644 (file)
@@ -28,7 +28,7 @@ protected:
                Loader(InstanceArrayBase &);
 
        private:
-               virtual void init_actions();
+               void init_actions() override;
 
        protected:
                virtual void instance() = 0;
@@ -70,7 +70,7 @@ private:
 
 protected:
        InstanceArrayBase(const Object &, std::size_t);
-       ~InstanceArrayBase();
+       ~InstanceArrayBase() override;
 
 private:
        void add_block(std::size_t);
@@ -93,7 +93,7 @@ protected:
 public:
        std::size_t size() const { return instance_count; }
 
-       virtual void render(Renderer &, Tag) const;
+       void render(Renderer &, Tag) const override;
 };
 
 template<typename T, typename A>
@@ -166,7 +166,7 @@ private:
 
 public:
        InstanceArray(const Object &o): InstanceArrayBase(o, sizeof(Instance)) { }
-       ~InstanceArray() { destroy_all<T>(); }
+       ~InstanceArray() override { destroy_all<T>(); }
 
        T &append() { return *create<Instance>(*this); }
        void remove(T &obj) { destroy(&obj); }
index deb8d5d2d9fe98e6621a05b525029c8ee1241527..9fd788d1b5d53070e6b3b8b8f5699c228849d11b 100644 (file)
@@ -56,7 +56,7 @@ public:
        public:
                Loader(Object &, Collection &);
        private:
-               virtual void finish();
+               void finish() override;
 
                void bounding_sphere_hint(float, float, float, float);
                void level_of_detail(unsigned);
@@ -80,7 +80,7 @@ public:
        Object(const Mesh *, const Technique *);
        Object(const Object &);
        Object(Object &&);
-       ~Object();
+       ~Object() override;
 
 private:
        LevelOfDetail &get_lod(unsigned, const char *);
@@ -111,10 +111,10 @@ public:
        const Technique *get_technique(unsigned = 0) const;
        unsigned get_n_lods() const { return lods.size(); }
 
-       virtual const Matrix *get_matrix() const { return &identity_matrix; }
-       virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return &bounding_sphere; }
+       const Matrix *get_matrix() const override { return &identity_matrix; }
+       const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const override { return &bounding_sphere; }
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 
        /** Renders an instance of the object.  The instance's hook functions are
        called before and after drawing the mesh. */
@@ -127,8 +127,8 @@ protected:
 private:
        const RenderMethod *get_method(Tag, unsigned) const;
 
-       virtual void resource_loaded(Resource &);
-       virtual void resource_removed(Resource &);
+       void resource_loaded(Resource &) override;
+       void resource_removed(Resource &) override;
 };
 
 } // namespace GL
index 9d815fb43d6c4337bc18f2205b788bcf4aa0888f..b096e54fdbd7be8cc1196986c0ee94306115d369 100644 (file)
@@ -36,9 +36,9 @@ public:
 
        const Object &get_object() const { return object; }
 
-       virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return object.get_bounding_sphere(); }
+       const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const override { return object.get_bounding_sphere(); }
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 
        /** Hook function, called from Object just before rendering the mesh.
        Renderer state will have been pushed before this is called. */
index 2a9f18a396421599854029a6fff1f7a9f4a112cd..19c55ed983f9c5d6b7090b0aba27f79fb30de5d9 100644 (file)
@@ -49,17 +49,17 @@ private:
 public:
        OccludedScene();
 
-       virtual void add(Renderable &);
-       virtual void remove(Renderable &);
+       void add(Renderable &) override;
+       void remove(Renderable &) override;
 
 private:
        void populate_cache() const;
 
 public:
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 };
 
 } // namespace GL
index bd2e22e2971b1db4d5bd46b0ae0764d1c7baea48..a635cb4da0ddaf86bfd824a187d481b316dd52a1 100644 (file)
@@ -23,7 +23,7 @@ public:
        const Texture2D &get_target_texture(FrameAttachment a) const { return target.get_target_texture(a); }
 
 private:
-       virtual const Framebuffer &get_target() const { return target.get_framebuffer(); }
+       const Framebuffer &get_target() const override { return target.get_framebuffer(); }
 };
 
 } // namespace GL
index e3218cb341a4c66a143f3f5f9cfc25582d97f3fc..3649b0158e19190540348c06f708a098b61cae29 100644 (file)
@@ -20,16 +20,16 @@ private:
        std::vector<Renderable *> content;
 
 public:
-       virtual void add(Renderable &);
-       virtual void remove(Renderable &);
+       void add(Renderable &) override;
+       void remove(Renderable &) override;
        void prepend(Renderable &);
        void insert(unsigned, Renderable &);
        void insert_after(Renderable &, Renderable &);
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 };
 
 } // namespace GL
index 7d8df5359269cc48bfc9b3d5d24ebfb4fa34bb8e..84d03554bc85fa27657f0dc6ef8762e170680e46 100644 (file)
@@ -40,7 +40,7 @@ protected:
 public:
        /* Reimplement to clear ambiguity between Renderable and Placeable.  This
        overrides both base classes' implementations. */
-       virtual const Matrix *get_matrix() const { return &matrix; }
+       const Matrix *get_matrix() const override { return &matrix; }
 };
 
 } // namespace GL
index 0e53e869c563fdcc68c94f1a906f73c18d7b08bb..353aa048568e3bde53005d2dd83e3a1af99fe629 100644 (file)
@@ -57,13 +57,13 @@ public:
                GenericLoader(DataFile::Collection &c): DynamicObjectLoader<Scene>(&c) { }
 
        protected:
-               virtual const TypeRegistry &get_type_registry() const { return get_scene_registry(); }
+               const TypeRegistry &get_type_registry() const override { return get_scene_registry(); }
        };
 
 protected:
        Scene() = default;
 public:
-       virtual ~Scene() = default;
+       ~Scene() override = default;
 
        virtual void add(Renderable &) = 0;
        virtual void remove(Renderable &) = 0;
index 9be14a4335826cf7c721bb3d8f8a8d023874a0cf..805aa9e01bc351c9a329099a4af75a5f6fdb12ee 100644 (file)
@@ -88,7 +88,7 @@ private:
 public:
        Sequence() = default;
        Sequence(unsigned, unsigned, const FrameFormat &);
-       ~Sequence();
+       ~Sequence() override;
 
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
@@ -116,10 +116,10 @@ public:
        void add_owned(T *p)
        { owned_data.push_back({ p, [](void *ptr){ delete static_cast<T *>(ptr); } }); }
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag tag = Tag()) const;
+       void render(Renderer &, Tag tag = Tag()) const override;
 
        void set_debug_name(const std::string &);
 };
index 9f3d3c12fbad269860090e24c101003feaa6770b..f0314696880bc408ecedc92841c4463ba97f3923 100644 (file)
@@ -20,13 +20,13 @@ private:
        std::vector<Renderable *> content;
 
 public:
-       virtual void add(Renderable &);
-       virtual void remove(Renderable &);
+       void add(Renderable &) override;
+       void remove(Renderable &) override;
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 };
 
 } // namespace GL
index 91dca7c1f04d7b8c38abf6d0c11074faeec4da2f..b0947de2fc09a0271e83ec45d458ab5f2f13b772 100644 (file)
@@ -20,11 +20,11 @@ public:
        void set(Renderable *);
        Renderable *get() const { return content; }
 
-       virtual const Matrix *get_matrix() const;
-       virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const;
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
-       virtual void render(Renderer &, Tag) const;
+       const Matrix *get_matrix() const override;
+       const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const override;
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
+       void render(Renderer &, Tag) const override;
 };
 
 } // namespace GL
index 812ab71fabd1b17676d0ca839cc84641eb485ca4..433c5f211e63984d23a5f9a8c8c18a7765372213 100644 (file)
@@ -85,7 +85,7 @@ public:
 
        float get_width() const { return width; }
 
-       virtual void setup_render(Renderer &, Tag) const;
+       void setup_render(Renderer &, Tag) const override;
 
        DEPRECATED operator const Object &() const { return object; }
 };
index f73d77fda5e69b32f498177d01c0092d5eb759d9..4db930f1fa154a221b19a5520475a457957eab8e 100644 (file)
@@ -29,8 +29,8 @@ public:
        WindowView(Graphics::Window &);
 
        Graphics::Window &get_window() { return window; }
-       virtual unsigned get_width() const { return window.get_width(); }
-       virtual unsigned get_height() const { return window.get_height(); }
+       unsigned get_width() const override { return window.get_width(); }
+       unsigned get_height() const override { return window.get_height(); }
 
        using View::render;
 
index 24267510653113522b06cf58effc702b7a83b5b6..c686e612c258f9df4fe1c3a6f717ce11c3149587 100644 (file)
@@ -54,8 +54,8 @@ private:
        mutable std::map<const Camera *, std::vector<SortedRenderable> > sorted_cache;
 
 public:
-       virtual void add(Renderable &);
-       virtual void remove(Renderable &);
+       void add(Renderable &) override;
+       void remove(Renderable &) override;
 
        /// Sets the sort order.  Default is back to front.
        void set_order(SortOrder);
@@ -63,10 +63,10 @@ public:
        /// Sets the reference point for sorting.  Default is furthest from camera.
        void set_reference(DepthReference);
 
-       virtual void setup_frame(Renderer &);
-       virtual void finish_frame();
+       void setup_frame(Renderer &) override;
+       void finish_frame() override;
 
-       virtual void render(Renderer &, Tag = Tag()) const;
+       void render(Renderer &, Tag = Tag()) const override;
 };
 
 } // namespace GL
index 97d60fd00087d34cc7c05763858c3c49c16f164c..4aac2eb30d4e9118923291a553cb9eb0ba48fe3b 100644 (file)
@@ -96,7 +96,7 @@ private:
                LoadingThread();
 
        private:
-               virtual void main();
+               void main() override;
 
                ManagedResource *front(std::deque<ManagedResource *> &);
 
index a04088444ec54ce26125132bf1de8838c50be693..cf9ad9f2cf5e687acc56f1784d8831fe95e43bde 100644 (file)
@@ -89,7 +89,7 @@ private:
 
 public:
        Resources(bool = true);
-       virtual ~Resources();
+       ~Resources() override;
 
        static Resources &get_global();
        static const DataFile::CollectionSource &get_builtins();
index f7bb2de9af1b8b090341d34383e0cde66cb7a204..dd5a6c6aae86760b16a830d1aad9057d32830c21 100644 (file)
@@ -37,7 +37,7 @@ private:
 public:
        GlslCompiler(int, char **);
 
-       virtual int main();
+       int main() override;
 };
 
 using namespace std;
index f4bb924d1964b00e8140c310d5d2139b72839172..0753ae255185d356adae11c4f31827889e4fefcf 100644 (file)
@@ -92,9 +92,9 @@ private:
 public:
        ~Viewer();
 
-       virtual int main();
+       int main() override;
 private:
-       virtual void tick();
+       void tick() override;
 
        void button_press(unsigned);
        void button_release(unsigned);