From 1abe428f36199c6e7c7ac8f865a6b7621041822f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 10:39:22 +0100 Subject: [PATCH 01/25] Changes inspired by cppckeck --- include/vsg/maths/box.h | 2 +- include/vsg/maths/mat2.h | 6 +++--- include/vsg/maths/mat3.h | 6 +++--- include/vsg/maths/mat4.h | 6 +++--- include/vsg/maths/plane.h | 2 +- include/vsg/maths/quat.h | 2 +- include/vsg/maths/sphere.h | 2 +- include/vsg/maths/vec2.h | 2 +- include/vsg/maths/vec3.h | 2 +- include/vsg/maths/vec4.h | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/vsg/maths/box.h b/include/vsg/maths/box.h index 80ab988d01..25fecafa54 100644 --- a/include/vsg/maths/box.h +++ b/include/vsg/maths/box.h @@ -42,7 +42,7 @@ namespace vsg constexpr t_box& operator=(const t_box&) = default; - constexpr std::size_t size() const { return 6; } + constexpr static std::size_t size() { return 6; } value_type& operator[](std::size_t i) { return data()[i]; } value_type operator[](std::size_t i) const { return data()[i]; } diff --git a/include/vsg/maths/mat2.h b/include/vsg/maths/mat2.h index dd011a9781..d9f8693e68 100644 --- a/include/vsg/maths/mat2.h +++ b/include/vsg/maths/mat2.h @@ -59,9 +59,9 @@ namespace vsg value[1] = rhs[1]; } - constexpr std::size_t size() const { return 4; } - constexpr std::size_t columns() const { return 2; } - constexpr std::size_t rows() const { return 2; } + constexpr static std::size_t size() { return 4; } + constexpr static std::size_t columns() { return 2; } + constexpr static std::size_t rows() { return 2; } column_type& operator[](std::size_t c) { return value[c]; } const column_type& operator[](std::size_t c) const { return value[c]; } diff --git a/include/vsg/maths/mat3.h b/include/vsg/maths/mat3.h index 95a9020513..510e1e2e4f 100644 --- a/include/vsg/maths/mat3.h +++ b/include/vsg/maths/mat3.h @@ -66,9 +66,9 @@ namespace vsg value[2] = rhs[2]; } - constexpr std::size_t size() const { return 9; } - constexpr std::size_t columns() const { return 3; } - constexpr std::size_t rows() const { return 3; } + constexpr static std::size_t size() { return 9; } + constexpr static std::size_t columns() { return 3; } + constexpr static std::size_t rows() { return 3; } column_type& operator[](std::size_t c) { return value[c]; } const column_type& operator[](std::size_t c) const { return value[c]; } diff --git a/include/vsg/maths/mat4.h b/include/vsg/maths/mat4.h index 8174d094b2..83257afc54 100644 --- a/include/vsg/maths/mat4.h +++ b/include/vsg/maths/mat4.h @@ -75,9 +75,9 @@ namespace vsg value[3] = rhs[3]; } - constexpr std::size_t size() const { return 16; } - constexpr std::size_t columns() const { return 4; } - constexpr std::size_t rows() const { return 4; } + constexpr static std::size_t size() { return 16; } + constexpr static std::size_t columns() { return 4; } + constexpr static std::size_t rows() { return 4; } column_type& operator[](std::size_t c) { return value[c]; } const column_type& operator[](std::size_t c) const { return value[c]; } diff --git a/include/vsg/maths/plane.h b/include/vsg/maths/plane.h index 1c28ea47b7..5ce9d44675 100644 --- a/include/vsg/maths/plane.h +++ b/include/vsg/maths/plane.h @@ -77,7 +77,7 @@ namespace vsg constexpr explicit t_plane(const t_vec4& v) : value{v[0], v[1], v[2], v[3]} {} - constexpr std::size_t size() const { return 4; } + constexpr static std::size_t size() { return 4; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } diff --git a/include/vsg/maths/quat.h b/include/vsg/maths/quat.h index a4a3aad531..ca42f8e47f 100644 --- a/include/vsg/maths/quat.h +++ b/include/vsg/maths/quat.h @@ -65,7 +65,7 @@ namespace vsg constexpr t_quat& operator=(const t_quat&) = default; - constexpr std::size_t size() const { return 4; } + constexpr static std::size_t size() { return 4; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } diff --git a/include/vsg/maths/sphere.h b/include/vsg/maths/sphere.h index 7de13c45c3..9ec6604ee9 100644 --- a/include/vsg/maths/sphere.h +++ b/include/vsg/maths/sphere.h @@ -74,7 +74,7 @@ namespace vsg constexpr t_sphere(R sx, R sy, R sz, R sd) : value{sx, sy, sz, sd} {} - constexpr std::size_t size() const { return 4; } + constexpr static std::size_t size() { return 4; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } diff --git a/include/vsg/maths/vec2.h b/include/vsg/maths/vec2.h index b39e5ff9fc..c83379a82a 100644 --- a/include/vsg/maths/vec2.h +++ b/include/vsg/maths/vec2.h @@ -68,7 +68,7 @@ namespace vsg constexpr explicit t_vec2(const t_vec2& v) : value{static_cast(v.x), static_cast(v.y)} {} - constexpr std::size_t size() const { return 2; } + constexpr static std::size_t size() { return 2; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } diff --git a/include/vsg/maths/vec3.h b/include/vsg/maths/vec3.h index 0aa38a3c37..8599501879 100644 --- a/include/vsg/maths/vec3.h +++ b/include/vsg/maths/vec3.h @@ -67,7 +67,7 @@ namespace vsg constexpr explicit t_vec3(const t_vec3& v) : value{static_cast(v.x), static_cast(v.y), static_cast(v.z)} {} - constexpr std::size_t size() const { return 3; } + constexpr static std::size_t size() { return 3; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } diff --git a/include/vsg/maths/vec4.h b/include/vsg/maths/vec4.h index f502896225..9ff9202f3c 100644 --- a/include/vsg/maths/vec4.h +++ b/include/vsg/maths/vec4.h @@ -78,7 +78,7 @@ namespace vsg constexpr t_vec4(const t_vec3& v, value_type in_w) : value{static_cast(v.x), static_cast(v.y), static_cast(v.z), in_w} {} - constexpr std::size_t size() const { return 4; } + constexpr static std::size_t size() { return 4; } value_type& operator[](std::size_t i) { return value[i]; } value_type operator[](std::size_t i) const { return value[i]; } From db6c9972715d3c3e528854f6ee95340707fbc7bd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 10:44:35 +0100 Subject: [PATCH 02/25] cppcheck suggested changes --- include/vsg/core/Allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vsg/core/Allocator.h b/include/vsg/core/Allocator.h index 4bf93d9941..a93e2e16ce 100644 --- a/include/vsg/core/Allocator.h +++ b/include/vsg/core/Allocator.h @@ -105,12 +105,12 @@ namespace vsg using other = allocator_affinity_adapter; }; - value_type* allocate(std::size_t n) + static value_type* allocate(std::size_t n) { return static_cast(vsg::allocate(n * sizeof(value_type), A)); } - void deallocate(value_type* ptr, std::size_t n) + static void deallocate(value_type* ptr, std::size_t n) { vsg::deallocate(ptr, n * sizeof(value_type)); } From d319760f161c6b08529c634570459e2b2ee8813d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 11:14:58 +0100 Subject: [PATCH 03/25] cppcheck fixes --- include/vsg/app/RecordTraversal.h | 2 +- include/vsg/core/Array.h | 2 +- include/vsg/core/Array2D.h | 2 +- include/vsg/core/Array3D.h | 2 +- include/vsg/core/Data.h | 2 +- include/vsg/core/Value.h | 2 +- include/vsg/io/ObjectFactory.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/vsg/app/RecordTraversal.h b/include/vsg/app/RecordTraversal.h index 42527d4f55..ccd15bd1eb 100644 --- a/include/vsg/app/RecordTraversal.h +++ b/include/vsg/app/RecordTraversal.h @@ -185,7 +185,7 @@ namespace vsg ref_ptr viewDependentState; protected: - virtual ~RecordTraversal(); + ~RecordTraversal() override; }; } // namespace vsg diff --git a/include/vsg/core/Array.h b/include/vsg/core/Array.h index 6fcc98fbe2..7ced4d5f73 100644 --- a/include/vsg/core/Array.h +++ b/include/vsg/core/Array.h @@ -344,7 +344,7 @@ namespace vsg const_iterator end() const { return const_iterator{data(_size), properties.stride}; } protected: - virtual ~Array() + ~Array() override { _delete(); } diff --git a/include/vsg/core/Array2D.h b/include/vsg/core/Array2D.h index 203a800828..6e557b89ad 100644 --- a/include/vsg/core/Array2D.h +++ b/include/vsg/core/Array2D.h @@ -340,7 +340,7 @@ namespace vsg const_iterator end() const { return const_iterator{data(_width * _height), properties.stride}; } protected: - virtual ~Array2D() + ~Array2D() override { _delete(); } diff --git a/include/vsg/core/Array3D.h b/include/vsg/core/Array3D.h index 1e1c26befa..fdd764f37c 100644 --- a/include/vsg/core/Array3D.h +++ b/include/vsg/core/Array3D.h @@ -356,7 +356,7 @@ namespace vsg const_iterator end() const { return const_iterator{data(_width * _height * _depth), properties.stride}; } protected: - virtual ~Array3D() + ~Array3D() override { _delete(); } diff --git a/include/vsg/core/Data.h b/include/vsg/core/Data.h index 8777ba3e24..8da44f29b9 100644 --- a/include/vsg/core/Data.h +++ b/include/vsg/core/Data.h @@ -227,7 +227,7 @@ namespace vsg const MipmapLayout* getMipmapLayout() const; protected: - virtual ~Data() {} + ~Data() override {} void _copy(const Data& rhs); void _clear(); diff --git a/include/vsg/core/Value.h b/include/vsg/core/Value.h index 0b60876db7..a5c02bd704 100644 --- a/include/vsg/core/Value.h +++ b/include/vsg/core/Value.h @@ -162,7 +162,7 @@ namespace vsg void set(const value_type& value) { _value = value; } protected: - virtual ~Value() {} + ~Value() override {} private: value_type _value; diff --git a/include/vsg/io/ObjectFactory.h b/include/vsg/io/ObjectFactory.h index ab8ec2dbf8..4ba6ce907a 100644 --- a/include/vsg/io/ObjectFactory.h +++ b/include/vsg/io/ObjectFactory.h @@ -46,7 +46,7 @@ namespace vsg static ref_ptr& instance(); protected: - virtual ~ObjectFactory(); + ~ObjectFactory() override; CreateMap _createMap; }; From c46e0fb249fe99e1ed87942976e6eb54265d4444 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 12:17:33 +0100 Subject: [PATCH 04/25] cppcheck fixes --- include/vsg/io/Logger.h | 2 +- include/vsg/nodes/Bin.h | 2 +- include/vsg/nodes/CullGroup.h | 2 +- include/vsg/nodes/CullNode.h | 2 +- include/vsg/nodes/DepthSorted.h | 2 +- include/vsg/nodes/Geometry.h | 2 +- include/vsg/nodes/Group.h | 2 +- include/vsg/nodes/InstanceDraw.h | 2 +- include/vsg/nodes/InstanceDrawIndexed.h | 2 +- include/vsg/nodes/InstanceNode.h | 2 +- include/vsg/nodes/InstrumentationNode.h | 2 +- include/vsg/nodes/LOD.h | 2 +- include/vsg/nodes/Layer.h | 2 +- include/vsg/nodes/Node.h | 2 +- include/vsg/nodes/PagedLOD.h | 2 +- include/vsg/nodes/QuadGroup.h | 2 +- include/vsg/nodes/RegionOfInterest.h | 2 +- include/vsg/nodes/StateGroup.h | 2 +- include/vsg/nodes/Switch.h | 2 +- include/vsg/nodes/VertexDraw.h | 2 +- include/vsg/nodes/VertexIndexDraw.h | 2 +- include/vsg/utils/Instrumentation.h | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/vsg/io/Logger.h b/include/vsg/io/Logger.h index 8791f901ff..84f5231fed 100644 --- a/include/vsg/io/Logger.h +++ b/include/vsg/io/Logger.h @@ -232,7 +232,7 @@ namespace vsg void log_stream(Level msg_level, PrintToStreamFunction print); protected: - virtual ~Logger(); + ~Logger() override; std::mutex _mutex; std::ostringstream _stream; diff --git a/include/vsg/nodes/Bin.h b/include/vsg/nodes/Bin.h index 8840237f40..4b8eca0f38 100644 --- a/include/vsg/nodes/Bin.h +++ b/include/vsg/nodes/Bin.h @@ -51,7 +51,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Bin(); + ~Bin() override; std::vector _matrices; std::vector _stateCommands; diff --git a/include/vsg/nodes/CullGroup.h b/include/vsg/nodes/CullGroup.h index 3e8cb28fc4..ed344cd36e 100644 --- a/include/vsg/nodes/CullGroup.h +++ b/include/vsg/nodes/CullGroup.h @@ -36,7 +36,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~CullGroup(); + ~CullGroup() override; }; VSG_type_name(vsg::CullGroup); diff --git a/include/vsg/nodes/CullNode.h b/include/vsg/nodes/CullNode.h index 71ce22e3de..ff851f288b 100644 --- a/include/vsg/nodes/CullNode.h +++ b/include/vsg/nodes/CullNode.h @@ -43,7 +43,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~CullNode(); + ~CullNode() override; }; VSG_type_name(vsg::CullNode); diff --git a/include/vsg/nodes/DepthSorted.h b/include/vsg/nodes/DepthSorted.h index ca9a9f7bdd..8e50c93134 100644 --- a/include/vsg/nodes/DepthSorted.h +++ b/include/vsg/nodes/DepthSorted.h @@ -46,7 +46,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~DepthSorted(); + ~DepthSorted() override; }; VSG_type_name(vsg::DepthSorted); diff --git a/include/vsg/nodes/Geometry.h b/include/vsg/nodes/Geometry.h index 0483e16286..ce40c599b3 100644 --- a/include/vsg/nodes/Geometry.h +++ b/include/vsg/nodes/Geometry.h @@ -54,7 +54,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~Geometry(); + ~Geometry() override; vk_buffer _vulkanData; VkIndexType indexType = VK_INDEX_TYPE_UINT16; diff --git a/include/vsg/nodes/Group.h b/include/vsg/nodes/Group.h index 1cd46fef7d..ff1e625974 100644 --- a/include/vsg/nodes/Group.h +++ b/include/vsg/nodes/Group.h @@ -59,7 +59,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Group(); + ~Group() override; }; VSG_type_name(vsg::Group); diff --git a/include/vsg/nodes/InstanceDraw.h b/include/vsg/nodes/InstanceDraw.h index 4c56c7ee98..c50fbb06a2 100644 --- a/include/vsg/nodes/InstanceDraw.h +++ b/include/vsg/nodes/InstanceDraw.h @@ -48,7 +48,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~InstanceDraw(); + ~InstanceDraw() override; }; VSG_type_name(vsg::InstanceDraw) diff --git a/include/vsg/nodes/InstanceDrawIndexed.h b/include/vsg/nodes/InstanceDrawIndexed.h index 88401443cc..07ee3aab1d 100644 --- a/include/vsg/nodes/InstanceDrawIndexed.h +++ b/include/vsg/nodes/InstanceDrawIndexed.h @@ -51,7 +51,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~InstanceDrawIndexed(); + ~InstanceDrawIndexed() override; VkIndexType indexType = VK_INDEX_TYPE_UINT16; }; diff --git a/include/vsg/nodes/InstanceNode.h b/include/vsg/nodes/InstanceNode.h index caadc408ce..5399defda8 100644 --- a/include/vsg/nodes/InstanceNode.h +++ b/include/vsg/nodes/InstanceNode.h @@ -76,7 +76,7 @@ namespace vsg void compile(Context& context) override; protected: - virtual ~InstanceNode(); + ~InstanceNode() override; }; VSG_type_name(vsg::InstanceNode); diff --git a/include/vsg/nodes/InstrumentationNode.h b/include/vsg/nodes/InstrumentationNode.h index 9ea80e156e..f336637f7c 100644 --- a/include/vsg/nodes/InstrumentationNode.h +++ b/include/vsg/nodes/InstrumentationNode.h @@ -50,7 +50,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~InstrumentationNode(); + ~InstrumentationNode() override; uint32_t _level = 1; uint_color _color; diff --git a/include/vsg/nodes/LOD.h b/include/vsg/nodes/LOD.h index da3d25f7f6..c7274da216 100644 --- a/include/vsg/nodes/LOD.h +++ b/include/vsg/nodes/LOD.h @@ -66,7 +66,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~LOD(); + ~LOD() override; }; VSG_type_name(vsg::LOD); diff --git a/include/vsg/nodes/Layer.h b/include/vsg/nodes/Layer.h index 6f19c579ee..2de68f7885 100644 --- a/include/vsg/nodes/Layer.h +++ b/include/vsg/nodes/Layer.h @@ -52,7 +52,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Layer(); + ~Layer() override; }; VSG_type_name(vsg::Layer); diff --git a/include/vsg/nodes/Node.h b/include/vsg/nodes/Node.h index b6d25b0936..ea1470f91c 100644 --- a/include/vsg/nodes/Node.h +++ b/include/vsg/nodes/Node.h @@ -33,7 +33,7 @@ namespace vsg static void operator delete(void* ptr); protected: - virtual ~Node(); + ~Node() override; }; VSG_type_name(vsg::Node); diff --git a/include/vsg/nodes/PagedLOD.h b/include/vsg/nodes/PagedLOD.h index cdd09e30d5..5c929fe5eb 100644 --- a/include/vsg/nodes/PagedLOD.h +++ b/include/vsg/nodes/PagedLOD.h @@ -78,7 +78,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~PagedLOD(); + ~PagedLOD() override; public: ref_ptr options; diff --git a/include/vsg/nodes/QuadGroup.h b/include/vsg/nodes/QuadGroup.h index 902008fd22..f4836c00d1 100644 --- a/include/vsg/nodes/QuadGroup.h +++ b/include/vsg/nodes/QuadGroup.h @@ -52,7 +52,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~QuadGroup(); + ~QuadGroup() override; }; VSG_type_name(vsg::QuadGroup); diff --git a/include/vsg/nodes/RegionOfInterest.h b/include/vsg/nodes/RegionOfInterest.h index 93d767d03c..2b54605d1c 100644 --- a/include/vsg/nodes/RegionOfInterest.h +++ b/include/vsg/nodes/RegionOfInterest.h @@ -50,7 +50,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~RegionOfInterest(); + ~RegionOfInterest() override; }; VSG_type_name(vsg::RegionOfInterest); diff --git a/include/vsg/nodes/StateGroup.h b/include/vsg/nodes/StateGroup.h index fb3dfd71aa..2f1f9044b4 100644 --- a/include/vsg/nodes/StateGroup.h +++ b/include/vsg/nodes/StateGroup.h @@ -81,7 +81,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~StateGroup(); + ~StateGroup() override; }; VSG_type_name(vsg::StateGroup); diff --git a/include/vsg/nodes/Switch.h b/include/vsg/nodes/Switch.h index 39264e7481..009f4c0743 100644 --- a/include/vsg/nodes/Switch.h +++ b/include/vsg/nodes/Switch.h @@ -69,7 +69,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Switch(); + ~Switch() override; }; VSG_type_name(vsg::Switch); diff --git a/include/vsg/nodes/VertexDraw.h b/include/vsg/nodes/VertexDraw.h index 0a26df4a6d..6db79b5412 100644 --- a/include/vsg/nodes/VertexDraw.h +++ b/include/vsg/nodes/VertexDraw.h @@ -50,7 +50,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~VertexDraw(); + ~VertexDraw() override; vk_buffer _vulkanData; }; diff --git a/include/vsg/nodes/VertexIndexDraw.h b/include/vsg/nodes/VertexIndexDraw.h index f5b0ec9f70..b9e06be9ec 100644 --- a/include/vsg/nodes/VertexIndexDraw.h +++ b/include/vsg/nodes/VertexIndexDraw.h @@ -53,7 +53,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~VertexIndexDraw(); + ~VertexIndexDraw() override; vk_buffer _vulkanData; VkIndexType indexType = VK_INDEX_TYPE_UINT16; diff --git a/include/vsg/utils/Instrumentation.h b/include/vsg/utils/Instrumentation.h index 2c10ca52c2..36d1e013c9 100644 --- a/include/vsg/utils/Instrumentation.h +++ b/include/vsg/utils/Instrumentation.h @@ -71,7 +71,7 @@ namespace vsg virtual void finish() const {} protected: - virtual ~Instrumentation(); + ~Instrumentation() override; }; VSG_type_name(vsg::Instrumentation); From fde64f46b691ed2d8d927bd028669627ca68b9d3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 12:37:32 +0100 Subject: [PATCH 05/25] cppcheck fixes --- include/vsg/core/Array.h | 12 ++++++------ include/vsg/core/Array2D.h | 12 ++++++------ include/vsg/core/Array3D.h | 12 ++++++------ include/vsg/core/Data.h | 8 ++++---- include/vsg/core/Object.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/vsg/core/Array.h b/include/vsg/core/Array.h index 7ced4d5f73..ec70eb4280 100644 --- a/include/vsg/core/Array.h +++ b/include/vsg/core/Array.h @@ -57,12 +57,12 @@ namespace vsg dirty(); } - explicit Array(uint32_t numElements, Properties in_properties = {}) : + explicit Array(uint32_t numElements, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(_allocate(numElements)), _size(numElements) { dirty(); } - Array(uint32_t numElements, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array(uint32_t numElements, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(in_properties, sizeof(value_type)), _data(data), _size(numElements) @@ -71,7 +71,7 @@ namespace vsg dirty(); } - Array(uint32_t numElements, const value_type& value, Properties in_properties = {}) : + Array(uint32_t numElements, const value_type& value, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(_allocate(numElements)), _size(numElements) @@ -80,7 +80,7 @@ namespace vsg dirty(); } - Array(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t numElements, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t numElements, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(), _data(nullptr), _size(0) @@ -247,7 +247,7 @@ namespace vsg return *this; } - void assign(uint32_t numElements, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(uint32_t numElements, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); @@ -262,7 +262,7 @@ namespace vsg dirty(); } - void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t numElements, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t numElements, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); diff --git a/include/vsg/core/Array2D.h b/include/vsg/core/Array2D.h index 6e557b89ad..1460faff43 100644 --- a/include/vsg/core/Array2D.h +++ b/include/vsg/core/Array2D.h @@ -57,7 +57,7 @@ namespace vsg } } - Array2D(uint32_t width, uint32_t height, Properties in_properties = {}) : + Array2D(uint32_t width, uint32_t height, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(nullptr), _width(width), @@ -67,7 +67,7 @@ namespace vsg dirty(); } - Array2D(uint32_t width, uint32_t height, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array2D(uint32_t width, uint32_t height, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(in_properties, sizeof(value_type)), _data(data), _width(width), @@ -77,7 +77,7 @@ namespace vsg dirty(); } - Array2D(uint32_t width, uint32_t height, const value_type& value, Properties in_properties = {}) : + Array2D(uint32_t width, uint32_t height, const value_type& value, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(nullptr), _width(width), @@ -91,7 +91,7 @@ namespace vsg } } - Array2D(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array2D(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(), _data(nullptr), _width(0), @@ -231,7 +231,7 @@ namespace vsg return *this; } - void assign(uint32_t width, uint32_t height, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(uint32_t width, uint32_t height, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); @@ -247,7 +247,7 @@ namespace vsg dirty(); } - void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); diff --git a/include/vsg/core/Array3D.h b/include/vsg/core/Array3D.h index fdd764f37c..aa3c911c1b 100644 --- a/include/vsg/core/Array3D.h +++ b/include/vsg/core/Array3D.h @@ -59,7 +59,7 @@ namespace vsg } } - Array3D(uint32_t width, uint32_t height, uint32_t depth, Properties in_properties = {}) : + Array3D(uint32_t width, uint32_t height, uint32_t depth, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(nullptr), _width(width), @@ -70,7 +70,7 @@ namespace vsg dirty(); } - Array3D(uint32_t width, uint32_t height, uint32_t depth, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array3D(uint32_t width, uint32_t height, uint32_t depth, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(in_properties, sizeof(value_type)), _data(data), _width(width), @@ -81,7 +81,7 @@ namespace vsg dirty(); } - Array3D(uint32_t width, uint32_t height, uint32_t depth, const value_type& value, Properties in_properties = {}) : + Array3D(uint32_t width, uint32_t height, uint32_t depth, const value_type& value, const Properties& in_properties = {}) : Data(in_properties, sizeof(value_type)), _data(nullptr), _width(width), @@ -96,7 +96,7 @@ namespace vsg } } - Array3D(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, uint32_t depth, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : + Array3D(ref_ptr data, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, uint32_t depth, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) : Data(), _data(nullptr), _width(0), @@ -242,7 +242,7 @@ namespace vsg return *this; } - void assign(uint32_t width, uint32_t height, uint32_t depth, value_type* data, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(uint32_t width, uint32_t height, uint32_t depth, value_type* data, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); @@ -259,7 +259,7 @@ namespace vsg dirty(); } - void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, uint32_t depth, Properties in_properties = {}, MipmapLayout* mipmapLayout = nullptr) + void assign(ref_ptr storage, uint32_t offset, uint32_t stride, uint32_t width, uint32_t height, uint32_t depth, const Properties& in_properties = {}, MipmapLayout* mipmapLayout = nullptr) { _delete(); diff --git a/include/vsg/core/Data.h b/include/vsg/core/Data.h index 8da44f29b9..338afbc481 100644 --- a/include/vsg/core/Data.h +++ b/include/vsg/core/Data.h @@ -144,10 +144,10 @@ namespace vsg Data(const Data& data, const CopyOp& copyop = {}) : Object(data, copyop), properties(data.properties) {} - explicit Data(Properties layout) : + explicit Data(const Properties& layout) : properties(layout) {} - Data(Properties layout, uint32_t min_stride) : + Data(const Properties& layout, uint32_t min_stride) : properties(layout) { if (properties.stride < min_stride) properties.stride = min_stride; @@ -240,7 +240,7 @@ namespace vsg using Layout = Properties; /// deprecated: use data->properties = properties instead. - void setLayout(Layout layout) + void setLayout(const Layout& layout) { VkFormat previous_format = properties.format; // temporary hack to keep applications that call setFormat(..) before setLayout(..) working uint32_t previous_stride = properties.stride; @@ -251,7 +251,7 @@ namespace vsg /// deprecated: use data->properties Layout& getLayout() { return properties; } /// deprecated: use data->properties - Layout getLayout() const { return properties; } + const Layout& getLayout() const { return properties; } #endif }; VSG_type_name(vsg::Data); diff --git a/include/vsg/core/Object.h b/include/vsg/core/Object.h index 242ff12380..02f678a4e7 100644 --- a/include/vsg/core/Object.h +++ b/include/vsg/core/Object.h @@ -260,7 +260,7 @@ namespace vsg C dest; dest.reserve(src.size()); - for (auto& ptr : src) + for (const auto& ptr : src) { dest.push_back(operator()(ptr)); } From afa8ae3324877ce74713ba6904a4dee8ccfa2df6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 12:58:47 +0100 Subject: [PATCH 06/25] cppcheck fixes --- include/vsg/animation/AnimationGroup.h | 2 +- include/vsg/animation/Joint.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vsg/animation/AnimationGroup.h b/include/vsg/animation/AnimationGroup.h index 32db782862..6d4ce7d56f 100644 --- a/include/vsg/animation/AnimationGroup.h +++ b/include/vsg/animation/AnimationGroup.h @@ -50,7 +50,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~AnimationGroup(); + ~AnimationGroup() override; }; VSG_type_name(vsg::AnimationGroup); diff --git a/include/vsg/animation/Joint.h b/include/vsg/animation/Joint.h index 2350e248ea..608f4fec9c 100644 --- a/include/vsg/animation/Joint.h +++ b/include/vsg/animation/Joint.h @@ -54,7 +54,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Joint(); + ~Joint() override; }; VSG_type_name(vsg::Joint); From abc52dc018c811ebb7061a24c5186e7f306a9c3e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 13:19:06 +0100 Subject: [PATCH 07/25] cppcheck fixes --- include/vsg/vk/AllocationCallbacks.h | 2 +- include/vsg/vk/CommandBuffer.h | 4 ++-- include/vsg/vk/CommandPool.h | 2 +- include/vsg/vk/Context.h | 2 +- include/vsg/vk/DescriptorPool.h | 2 +- include/vsg/vk/DescriptorPools.h | 2 +- include/vsg/vk/Device.h | 2 +- include/vsg/vk/DeviceMemory.h | 4 ++-- include/vsg/vk/Fence.h | 2 +- include/vsg/vk/Framebuffer.h | 2 +- include/vsg/vk/Instance.h | 2 +- include/vsg/vk/PhysicalDevice.h | 3 +-- include/vsg/vk/Queue.h | 2 +- include/vsg/vk/RenderPass.h | 2 +- include/vsg/vk/Semaphore.h | 2 +- include/vsg/vk/Surface.h | 2 +- include/vsg/vk/Swapchain.h | 2 +- 17 files changed, 19 insertions(+), 20 deletions(-) diff --git a/include/vsg/vk/AllocationCallbacks.h b/include/vsg/vk/AllocationCallbacks.h index 7bc308400e..0730cba5c7 100644 --- a/include/vsg/vk/AllocationCallbacks.h +++ b/include/vsg/vk/AllocationCallbacks.h @@ -27,7 +27,7 @@ namespace vsg VkAllocationCallbacks{} {} protected: - virtual ~AllocationCallbacks() {} + ~AllocationCallbacks() override {} }; /* diff --git a/include/vsg/vk/CommandBuffer.h b/include/vsg/vk/CommandBuffer.h index a9f5cb929b..8c5ca3aa42 100644 --- a/include/vsg/vk/CommandBuffer.h +++ b/include/vsg/vk/CommandBuffer.h @@ -66,7 +66,7 @@ namespace vsg friend CommandPool; CommandBuffer(CommandPool* commandPool, VkCommandBuffer commandBuffer, VkCommandBufferLevel level); - virtual ~CommandBuffer(); + ~CommandBuffer() override; VkCommandBuffer _commandBuffer; VkCommandBufferLevel _level; @@ -94,7 +94,7 @@ namespace vsg CommandBuffers buffers() const; protected: - virtual ~RecordedCommandBuffers(); + ~RecordedCommandBuffers(); mutable std::mutex _mutex; std::map> _orderedCommandBuffers; CommandBuffers _commandBuffers; diff --git a/include/vsg/vk/CommandPool.h b/include/vsg/vk/CommandPool.h index c287499827..b6cd69f789 100644 --- a/include/vsg/vk/CommandPool.h +++ b/include/vsg/vk/CommandPool.h @@ -41,7 +41,7 @@ namespace vsg const Device* getDevice() const { return _device; } protected: - virtual ~CommandPool(); + ~CommandPool() override; friend CommandBuffer; diff --git a/include/vsg/vk/Context.h b/include/vsg/vk/Context.h index daa5bb1ede..02d0e51446 100644 --- a/include/vsg/vk/Context.h +++ b/include/vsg/vk/Context.h @@ -70,7 +70,7 @@ namespace vsg Context(const Context& context); - virtual ~Context(); + ~Context() override; const uint32_t deviceID = 0; ref_ptr device; diff --git a/include/vsg/vk/DescriptorPool.h b/include/vsg/vk/DescriptorPool.h index 8bbaca55ee..e4324a06ba 100644 --- a/include/vsg/vk/DescriptorPool.h +++ b/include/vsg/vk/DescriptorPool.h @@ -54,7 +54,7 @@ namespace vsg mutable std::mutex mutex; protected: - virtual ~DescriptorPool(); + ~DescriptorPool() override; VkDescriptorPool _descriptorPool; ref_ptr _device; diff --git a/include/vsg/vk/DescriptorPools.h b/include/vsg/vk/DescriptorPools.h index 1ded89cae6..443f3f94c4 100644 --- a/include/vsg/vk/DescriptorPools.h +++ b/include/vsg/vk/DescriptorPools.h @@ -56,7 +56,7 @@ namespace vsg bool allocated(uint32_t& numSets, DescriptorPoolSizes& descriptorPoolSizes) const; protected: - virtual ~DescriptorPools(); + ~DescriptorPools() override; /// get the maxSets and descriptorPoolSizes to use void getDescriptorPoolSizesToUse(uint32_t& maxSets, DescriptorPoolSizes& descriptorPoolSizes); diff --git a/include/vsg/vk/Device.h b/include/vsg/vk/Device.h index 0c48c01e53..92b97bfcef 100644 --- a/include/vsg/vk/Device.h +++ b/include/vsg/vk/Device.h @@ -95,7 +95,7 @@ namespace vsg observer_ptr transferTask; protected: - virtual ~Device(); + ~Device() override; VkDevice _device; diff --git a/include/vsg/vk/DeviceMemory.h b/include/vsg/vk/DeviceMemory.h index a2db80a092..f349ac7bf6 100644 --- a/include/vsg/vk/DeviceMemory.h +++ b/include/vsg/vk/DeviceMemory.h @@ -59,7 +59,7 @@ namespace vsg void report(LogOutput& out) const; protected: - virtual ~DeviceMemory(); + ~DeviceMemory() override; VkDeviceMemory _deviceMemory; VkMemoryRequirements _memoryRequirements; @@ -105,7 +105,7 @@ namespace vsg return data; } - virtual ~MappedData() + ~MappedData() override { T::dataRelease(); // make sure that the Array doesn't delete this memory _deviceMemory->unmap(); diff --git a/include/vsg/vk/Fence.h b/include/vsg/vk/Fence.h index ebf90e80b5..b5ce2900dd 100644 --- a/include/vsg/vk/Fence.h +++ b/include/vsg/vk/Fence.h @@ -44,7 +44,7 @@ namespace vsg const Device* getDevice() const { return _device; } protected: - virtual ~Fence(); + ~Fence() override; VkFence _vkFence; Semaphores _dependentSemaphores; diff --git a/include/vsg/vk/Framebuffer.h b/include/vsg/vk/Framebuffer.h index f9daca0283..e09db28f48 100644 --- a/include/vsg/vk/Framebuffer.h +++ b/include/vsg/vk/Framebuffer.h @@ -43,7 +43,7 @@ namespace vsg VkExtent2D extent2D() const { return VkExtent2D{_width, _height}; } protected: - virtual ~Framebuffer(); + ~Framebuffer() override; VkFramebuffer _framebuffer; ref_ptr _device; diff --git a/include/vsg/vk/Instance.h b/include/vsg/vk/Instance.h index c863a99923..965df75c8d 100644 --- a/include/vsg/vk/Instance.h +++ b/include/vsg/vk/Instance.h @@ -90,7 +90,7 @@ namespace vsg } protected: - virtual ~Instance(); + ~Instance() override; VkInstance _instance; ref_ptr _allocator; diff --git a/include/vsg/vk/PhysicalDevice.h b/include/vsg/vk/PhysicalDevice.h index b5f27f805e..6ecf2566e6 100644 --- a/include/vsg/vk/PhysicalDevice.h +++ b/include/vsg/vk/PhysicalDevice.h @@ -81,8 +81,7 @@ namespace vsg protected: // use Instance::getDevice(..) to create PhysicalDevice PhysicalDevice(Instance* instance, VkPhysicalDevice device); - - virtual ~PhysicalDevice(); + ~PhysicalDevice() override; friend class Instance; diff --git a/include/vsg/vk/Queue.h b/include/vsg/vk/Queue.h index 8f53140ae2..be4d04cf8b 100644 --- a/include/vsg/vk/Queue.h +++ b/include/vsg/vk/Queue.h @@ -44,7 +44,7 @@ namespace vsg protected: Queue(VkQueue queue, VkQueueFlags queueFlags, uint32_t queueFamilyIndex, uint32_t queueIndex); - virtual ~Queue(); + ~Queue() override; Queue() = delete; Queue(const Queue&) = delete; diff --git a/include/vsg/vk/RenderPass.h b/include/vsg/vk/RenderPass.h index dd9af0cbb0..02d988048b 100644 --- a/include/vsg/vk/RenderPass.h +++ b/include/vsg/vk/RenderPass.h @@ -107,7 +107,7 @@ namespace vsg const VkSampleCountFlagBits maxSamples; protected: - virtual ~RenderPass(); + ~RenderPass() override; /// Vulkan renderPass handle, created in RenderPass constructor. VkRenderPass _renderPass; diff --git a/include/vsg/vk/Semaphore.h b/include/vsg/vk/Semaphore.h index 14ce5438cc..6be180dcd0 100644 --- a/include/vsg/vk/Semaphore.h +++ b/include/vsg/vk/Semaphore.h @@ -36,7 +36,7 @@ namespace vsg const Device* getDevice() const { return _device; } protected: - virtual ~Semaphore(); + ~Semaphore() override; VkSemaphore _semaphore; VkPipelineStageFlags _pipelineStageFlags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; diff --git a/include/vsg/vk/Surface.h b/include/vsg/vk/Surface.h index 61455b58b9..7e2000e035 100644 --- a/include/vsg/vk/Surface.h +++ b/include/vsg/vk/Surface.h @@ -39,7 +39,7 @@ namespace vsg } protected: - virtual ~Surface(); + ~Surface() override; VkSurfaceKHR _surface; ref_ptr _instance; diff --git a/include/vsg/vk/Swapchain.h b/include/vsg/vk/Swapchain.h index 97d3f4c821..6f5114f879 100644 --- a/include/vsg/vk/Swapchain.h +++ b/include/vsg/vk/Swapchain.h @@ -60,7 +60,7 @@ namespace vsg VkResult acquireNextImage(uint64_t timeout, ref_ptr semaphore, ref_ptr fence, uint32_t& imageIndex); protected: - virtual ~Swapchain(); + ~Swapchain() override; vsg::ref_ptr _device; vsg::ref_ptr _surface; From 9d91ad41cb4b793e3c9d3b0db034dc758cd1a6e8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 13:47:24 +0100 Subject: [PATCH 08/25] cppcheck fixes --- include/vsg/core/ScratchMemory.h | 2 +- include/vsg/vk/DeviceFeatures.h | 2 +- include/vsg/vk/vk_buffer.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/vsg/core/ScratchMemory.h b/include/vsg/core/ScratchMemory.h index 17a06bd5bb..2eb0865ff6 100644 --- a/include/vsg/core/ScratchMemory.h +++ b/include/vsg/core/ScratchMemory.h @@ -42,7 +42,7 @@ namespace vsg delete[] buffer; } - uint8_t* align(uint8_t* p) const + static uint8_t* align(uint8_t* p) { auto alignment = sizeof(p); uint8_t* new_p = reinterpret_cast(((reinterpret_cast(p) + alignment - 1) / alignment) * alignment); diff --git a/include/vsg/vk/DeviceFeatures.h b/include/vsg/vk/DeviceFeatures.h index 54b61b9637..c9aa381fc0 100644 --- a/include/vsg/vk/DeviceFeatures.h +++ b/include/vsg/vk/DeviceFeatures.h @@ -64,7 +64,7 @@ namespace vsg void* data() const; protected: - ~DeviceFeatures(); + ~DeviceFeatures() override; struct FeatureHeader { diff --git a/include/vsg/vk/vk_buffer.h b/include/vsg/vk/vk_buffer.h index eb4833022c..4a2b9418b0 100644 --- a/include/vsg/vk/vk_buffer.h +++ b/include/vsg/vk/vk_buffer.h @@ -32,7 +32,7 @@ namespace vsg T& operator[](uint32_t) { return value; } const T& operator[](uint32_t) const { return value; } - uint32_t size() const { return 1; } + constexpr static uint32_t size() { return 1; } void clear() { value = {}; } From 5ef2fe24d24d124c944ec96c40c483e4478d12ff Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 13:57:16 +0100 Subject: [PATCH 09/25] cppcheck fixes --- include/vsg/state/ArrayState.h | 2 +- include/vsg/state/BindDescriptorSet.h | 2 +- include/vsg/state/Buffer.h | 2 +- include/vsg/state/BufferInfo.h | 2 +- include/vsg/state/BufferView.h | 2 +- include/vsg/state/ColorBlendState.h | 2 +- include/vsg/state/ComputePipeline.h | 4 ++-- include/vsg/state/DepthStencilState.h | 2 +- include/vsg/state/DescriptorBuffer.h | 2 +- include/vsg/state/DescriptorSet.h | 2 +- include/vsg/state/DescriptorSetLayout.h | 2 +- include/vsg/state/DynamicState.h | 2 +- include/vsg/state/GraphicsPipeline.h | 4 ++-- include/vsg/state/Image.h | 2 +- include/vsg/state/ImageInfo.h | 2 +- include/vsg/state/ImageView.h | 2 +- include/vsg/state/InputAssemblyState.h | 2 +- include/vsg/state/MultisampleState.h | 2 +- include/vsg/state/PipelineLayout.h | 2 +- include/vsg/state/PushConstants.h | 2 +- include/vsg/state/RasterizationState.h | 2 +- include/vsg/state/ResourceHints.h | 2 +- include/vsg/state/Sampler.h | 2 +- include/vsg/state/ShaderModule.h | 2 +- include/vsg/state/ShaderStage.h | 2 +- include/vsg/state/StateCommand.h | 2 +- include/vsg/state/TessellationState.h | 2 +- include/vsg/state/VertexInputState.h | 2 +- include/vsg/state/ViewDependentState.h | 2 +- include/vsg/state/ViewportState.h | 2 +- 30 files changed, 32 insertions(+), 32 deletions(-) diff --git a/include/vsg/state/ArrayState.h b/include/vsg/state/ArrayState.h index 4c4897495c..d2ff248632 100644 --- a/include/vsg/state/ArrayState.h +++ b/include/vsg/state/ArrayState.h @@ -92,7 +92,7 @@ namespace vsg virtual ref_ptr vertexArray(uint32_t instanceIndex); protected: - virtual ~ArrayState() {} + ~ArrayState() override {} }; VSG_type_name(vsg::ArrayState); diff --git a/include/vsg/state/BindDescriptorSet.h b/include/vsg/state/BindDescriptorSet.h index b38ea92b4c..a27b7b4408 100644 --- a/include/vsg/state/BindDescriptorSet.h +++ b/include/vsg/state/BindDescriptorSet.h @@ -74,7 +74,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~BindDescriptorSets() {} + ~BindDescriptorSets() override {} struct VulkanData { diff --git a/include/vsg/state/Buffer.h b/include/vsg/state/Buffer.h index f4c6530154..65a800ac21 100644 --- a/include/vsg/state/Buffer.h +++ b/include/vsg/state/Buffer.h @@ -60,7 +60,7 @@ namespace vsg virtual bool compile(Context& context); protected: - virtual ~Buffer(); + ~Buffer() override; struct VulkanData { diff --git a/include/vsg/state/BufferInfo.h b/include/vsg/state/BufferInfo.h index dc132c2e1f..f592ef608a 100644 --- a/include/vsg/state/BufferInfo.h +++ b/include/vsg/state/BufferInfo.h @@ -74,7 +74,7 @@ namespace vsg vk_buffer copiedModifiedCounts; protected: - virtual ~BufferInfo(); + ~BufferInfo() override; }; VSG_type_name(vsg::BufferInfo); diff --git a/include/vsg/state/BufferView.h b/include/vsg/state/BufferView.h index 862efeb653..3e11ff7ba4 100644 --- a/include/vsg/state/BufferView.h +++ b/include/vsg/state/BufferView.h @@ -42,7 +42,7 @@ namespace vsg virtual void compile(Context& context); protected: - virtual ~BufferView(); + ~BufferView() override; struct VulkanData { diff --git a/include/vsg/state/ColorBlendState.h b/include/vsg/state/ColorBlendState.h index 8f4d6558e0..0c9ac2a0a2 100644 --- a/include/vsg/state/ColorBlendState.h +++ b/include/vsg/state/ColorBlendState.h @@ -44,7 +44,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~ColorBlendState(); + ~ColorBlendState() override; }; VSG_type_name(vsg::ColorBlendState); diff --git a/include/vsg/state/ComputePipeline.h b/include/vsg/state/ComputePipeline.h index a832fa0f63..923f027a99 100644 --- a/include/vsg/state/ComputePipeline.h +++ b/include/vsg/state/ComputePipeline.h @@ -45,7 +45,7 @@ namespace vsg VkPipeline vk(uint32_t deviceID) const { return _implementation[deviceID]->_pipeline; } protected: - virtual ~ComputePipeline(); + ~ComputePipeline() override; struct Implementation : public Inherit { @@ -80,7 +80,7 @@ namespace vsg void compile(Context& context) override; public: - virtual ~BindComputePipeline(); + ~BindComputePipeline() override; }; VSG_type_name(vsg::BindComputePipeline); diff --git a/include/vsg/state/DepthStencilState.h b/include/vsg/state/DepthStencilState.h index aa0f25299b..5085f19462 100644 --- a/include/vsg/state/DepthStencilState.h +++ b/include/vsg/state/DepthStencilState.h @@ -43,7 +43,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~DepthStencilState(); + ~DepthStencilState() override; }; VSG_type_name(vsg::DepthStencilState); diff --git a/include/vsg/state/DescriptorBuffer.h b/include/vsg/state/DescriptorBuffer.h index 013c824498..d259aae85d 100644 --- a/include/vsg/state/DescriptorBuffer.h +++ b/include/vsg/state/DescriptorBuffer.h @@ -46,7 +46,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~DescriptorBuffer(); + ~DescriptorBuffer() override; }; VSG_type_name(vsg::DescriptorBuffer) diff --git a/include/vsg/state/DescriptorSet.h b/include/vsg/state/DescriptorSet.h index b6e6ee424b..32b1238a73 100644 --- a/include/vsg/state/DescriptorSet.h +++ b/include/vsg/state/DescriptorSet.h @@ -85,7 +85,7 @@ namespace vsg }; protected: - virtual ~DescriptorSet(); + ~DescriptorSet() override; vk_buffer> _implementation; }; diff --git a/include/vsg/state/DescriptorSetLayout.h b/include/vsg/state/DescriptorSetLayout.h index 9479114083..98d6e57c04 100644 --- a/include/vsg/state/DescriptorSetLayout.h +++ b/include/vsg/state/DescriptorSetLayout.h @@ -64,7 +64,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~DescriptorSetLayout(); + ~DescriptorSetLayout() override; struct Implementation : public Inherit { diff --git a/include/vsg/state/DynamicState.h b/include/vsg/state/DynamicState.h index 420025129b..b316449f88 100644 --- a/include/vsg/state/DynamicState.h +++ b/include/vsg/state/DynamicState.h @@ -46,7 +46,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~DynamicState(); + ~DynamicState() override; }; VSG_type_name(vsg::DynamicState); diff --git a/include/vsg/state/GraphicsPipeline.h b/include/vsg/state/GraphicsPipeline.h index 81fd7f79be..6ace23c6c1 100644 --- a/include/vsg/state/GraphicsPipeline.h +++ b/include/vsg/state/GraphicsPipeline.h @@ -44,7 +44,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~GraphicsPipelineState() {} + ~GraphicsPipelineState() override {} }; VSG_type_name(vsg::GraphicsPipelineState); @@ -88,7 +88,7 @@ namespace vsg void release() { _implementation.clear(); } protected: - virtual ~GraphicsPipeline(); + ~GraphicsPipeline() override; struct Implementation : public Inherit { diff --git a/include/vsg/state/Image.h b/include/vsg/state/Image.h index 9a802e1a7d..55f4b7da69 100644 --- a/include/vsg/state/Image.h +++ b/include/vsg/state/Image.h @@ -72,7 +72,7 @@ namespace vsg virtual VkResult compile(MemoryBufferPools& memoryBufferPools); protected: - virtual ~Image(); + ~Image() override; struct VulkanData { diff --git a/include/vsg/state/ImageInfo.h b/include/vsg/state/ImageInfo.h index 7d26450186..e8c5d9ebd7 100644 --- a/include/vsg/state/ImageInfo.h +++ b/include/vsg/state/ImageInfo.h @@ -69,7 +69,7 @@ namespace vsg vk_buffer copiedModifiedCounts; protected: - virtual ~ImageInfo(); + ~ImageInfo() override; }; VSG_type_name(vsg::ImageInfo); diff --git a/include/vsg/state/ImageView.h b/include/vsg/state/ImageView.h index 9de4bcbc0c..828e239a3e 100644 --- a/include/vsg/state/ImageView.h +++ b/include/vsg/state/ImageView.h @@ -44,7 +44,7 @@ namespace vsg virtual void compile(Context& context); protected: - virtual ~ImageView(); + ~ImageView() override; struct VulkanData { diff --git a/include/vsg/state/InputAssemblyState.h b/include/vsg/state/InputAssemblyState.h index 428d50ed67..a82031066e 100644 --- a/include/vsg/state/InputAssemblyState.h +++ b/include/vsg/state/InputAssemblyState.h @@ -35,7 +35,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~InputAssemblyState(); + ~InputAssemblyState() override; }; VSG_type_name(vsg::InputAssemblyState); diff --git a/include/vsg/state/MultisampleState.h b/include/vsg/state/MultisampleState.h index 5da05e09fd..826e10c789 100644 --- a/include/vsg/state/MultisampleState.h +++ b/include/vsg/state/MultisampleState.h @@ -38,7 +38,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~MultisampleState(); + ~MultisampleState() override; }; VSG_type_name(vsg::MultisampleState); diff --git a/include/vsg/state/PipelineLayout.h b/include/vsg/state/PipelineLayout.h index 2d5554f993..747d46fbfe 100644 --- a/include/vsg/state/PipelineLayout.h +++ b/include/vsg/state/PipelineLayout.h @@ -54,7 +54,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~PipelineLayout(); + ~PipelineLayout() override; struct Implementation : public Inherit { diff --git a/include/vsg/state/PushConstants.h b/include/vsg/state/PushConstants.h index bab577ff2b..e12735aea7 100644 --- a/include/vsg/state/PushConstants.h +++ b/include/vsg/state/PushConstants.h @@ -37,7 +37,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~PushConstants(); + ~PushConstants() override; }; VSG_type_name(vsg::PushConstants); diff --git a/include/vsg/state/RasterizationState.h b/include/vsg/state/RasterizationState.h index 6487b3f019..33e1c0802a 100644 --- a/include/vsg/state/RasterizationState.h +++ b/include/vsg/state/RasterizationState.h @@ -45,7 +45,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~RasterizationState(); + ~RasterizationState() override; }; VSG_type_name(vsg::RasterizationState); diff --git a/include/vsg/state/ResourceHints.h b/include/vsg/state/ResourceHints.h index 91fc704372..dc23b1c4ae 100644 --- a/include/vsg/state/ResourceHints.h +++ b/include/vsg/state/ResourceHints.h @@ -92,7 +92,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~ResourceHints(); + ~ResourceHints() override; }; VSG_type_name(vsg::ResourceHints); diff --git a/include/vsg/state/Sampler.h b/include/vsg/state/Sampler.h index 239e8366ff..d85d288e21 100644 --- a/include/vsg/state/Sampler.h +++ b/include/vsg/state/Sampler.h @@ -59,7 +59,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Sampler(); + ~Sampler() override; struct Implementation : public Inherit { diff --git a/include/vsg/state/ShaderModule.h b/include/vsg/state/ShaderModule.h index c55e2407ae..7ce0923cf3 100644 --- a/include/vsg/state/ShaderModule.h +++ b/include/vsg/state/ShaderModule.h @@ -105,7 +105,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~ShaderModule(); + ~ShaderModule() override; struct Implementation : public Inherit { diff --git a/include/vsg/state/ShaderStage.h b/include/vsg/state/ShaderStage.h index 404e34f146..1b6ec3fe25 100644 --- a/include/vsg/state/ShaderStage.h +++ b/include/vsg/state/ShaderStage.h @@ -58,7 +58,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~ShaderStage(); + ~ShaderStage() override; }; VSG_type_name(vsg::ShaderStage); diff --git a/include/vsg/state/StateCommand.h b/include/vsg/state/StateCommand.h index 01e393b489..7e3f65ff99 100644 --- a/include/vsg/state/StateCommand.h +++ b/include/vsg/state/StateCommand.h @@ -36,7 +36,7 @@ namespace vsg uint32_t slot = 0; protected: - virtual ~StateCommand() {} + ~StateCommand() override {} }; VSG_type_name(vsg::StateCommand); diff --git a/include/vsg/state/TessellationState.h b/include/vsg/state/TessellationState.h index 430a3dbfd2..27998b1298 100644 --- a/include/vsg/state/TessellationState.h +++ b/include/vsg/state/TessellationState.h @@ -36,7 +36,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~TessellationState(); + ~TessellationState() override; }; VSG_type_name(vsg::TessellationState); diff --git a/include/vsg/state/VertexInputState.h b/include/vsg/state/VertexInputState.h index ff74e2f253..50221af206 100644 --- a/include/vsg/state/VertexInputState.h +++ b/include/vsg/state/VertexInputState.h @@ -40,7 +40,7 @@ namespace vsg void apply(Context& context, VkGraphicsPipelineCreateInfo& pipelineInfo) const override; protected: - virtual ~VertexInputState(); + ~VertexInputState() override; }; VSG_type_name(vsg::VertexInputState); diff --git a/include/vsg/state/ViewDependentState.h b/include/vsg/state/ViewDependentState.h index a502fdcb4e..76b75922f1 100644 --- a/include/vsg/state/ViewDependentState.h +++ b/include/vsg/state/ViewDependentState.h @@ -88,7 +88,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~BindViewDescriptorSets() {} + ~BindViewDescriptorSets() override {} }; VSG_type_name(vsg::BindViewDescriptorSets); diff --git a/include/vsg/state/ViewportState.h b/include/vsg/state/ViewportState.h index 89ac086340..0cf3ddb3b8 100644 --- a/include/vsg/state/ViewportState.h +++ b/include/vsg/state/ViewportState.h @@ -55,7 +55,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~ViewportState(); + ~ViewportState() override; }; VSG_type_name(vsg::ViewportState); From 668084c50da5041c6af6958a7f9068a87f87ccd7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 14:08:55 +0100 Subject: [PATCH 10/25] cppcheck fixes --- include/vsg/app/CommandGraph.h | 2 +- include/vsg/app/SecondaryCommandGraph.h | 2 +- include/vsg/app/UpdateOperations.h | 2 +- include/vsg/app/View.h | 2 +- include/vsg/app/Viewer.h | 2 +- include/vsg/app/Window.h | 2 +- include/vsg/app/WindowAdapter.h | 2 +- include/vsg/app/WindowTraits.h | 2 +- include/vsg/state/GraphicsPipeline.h | 2 +- include/vsg/threading/ActivityStatus.h | 2 +- include/vsg/threading/Barrier.h | 2 +- include/vsg/threading/DeleteQueue.h | 2 +- include/vsg/threading/FrameBlock.h | 2 +- include/vsg/threading/Latch.h | 2 +- include/vsg/threading/OperationThreads.h | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/vsg/app/CommandGraph.h b/include/vsg/app/CommandGraph.h index d7cccddc38..f16e400bc2 100644 --- a/include/vsg/app/CommandGraph.h +++ b/include/vsg/app/CommandGraph.h @@ -54,7 +54,7 @@ namespace vsg ref_ptr instrumentation; protected: - virtual ~CommandGraph(); + ~CommandGraph() override; CommandBuffers _commandBuffers; // assign one per index? Or just use round robin, each has a CommandPool }; diff --git a/include/vsg/app/SecondaryCommandGraph.h b/include/vsg/app/SecondaryCommandGraph.h index 7e03f35f1e..ace2168cfc 100644 --- a/include/vsg/app/SecondaryCommandGraph.h +++ b/include/vsg/app/SecondaryCommandGraph.h @@ -43,7 +43,7 @@ namespace vsg void record(ref_ptr recordedCommandBuffers, ref_ptr frameStamp = {}, ref_ptr databasePager = {}) override; protected: - virtual ~SecondaryCommandGraph(); + ~SecondaryCommandGraph() override; friend ExecuteCommands; diff --git a/include/vsg/app/UpdateOperations.h b/include/vsg/app/UpdateOperations.h index e2530ee44f..0ad12f7fa2 100644 --- a/include/vsg/app/UpdateOperations.h +++ b/include/vsg/app/UpdateOperations.h @@ -55,7 +55,7 @@ namespace vsg virtual void run(); protected: - virtual ~UpdateOperations(); + ~UpdateOperations() override; mutable std::mutex _updateOperationMutex; std::list> _updateOperationsOneTime; diff --git a/include/vsg/app/View.h b/include/vsg/app/View.h index 94ea32d1be..b20ad41db3 100644 --- a/include/vsg/app/View.h +++ b/include/vsg/app/View.h @@ -90,7 +90,7 @@ namespace vsg GraphicsPipelineStates overridePipelineStates; protected: - virtual ~View(); + ~View() override; }; VSG_type_name(vsg::View); diff --git a/include/vsg/app/Viewer.h b/include/vsg/app/Viewer.h index a2603e0daa..8d0127a97f 100644 --- a/include/vsg/app/Viewer.h +++ b/include/vsg/app/Viewer.h @@ -149,7 +149,7 @@ namespace vsg void assignInstrumentation(ref_ptr in_instrumentation); protected: - virtual ~Viewer(); + ~Viewer() override; bool _close = false; diff --git a/include/vsg/app/Window.h b/include/vsg/app/Window.h index 8d84920c1a..736f5ec708 100644 --- a/include/vsg/app/Window.h +++ b/include/vsg/app/Window.h @@ -134,7 +134,7 @@ namespace vsg protected: Window(ref_ptr traits); - virtual ~Window(); + ~Window() override; virtual void _initSurface() = 0; void _initFormats(); diff --git a/include/vsg/app/WindowAdapter.h b/include/vsg/app/WindowAdapter.h index bb30230377..1c047f7927 100644 --- a/include/vsg/app/WindowAdapter.h +++ b/include/vsg/app/WindowAdapter.h @@ -41,7 +41,7 @@ namespace vsg bool windowValid = false; protected: - virtual ~WindowAdapter() {} + ~WindowAdapter() override {} void _initSurface() override {}; }; diff --git a/include/vsg/app/WindowTraits.h b/include/vsg/app/WindowTraits.h index 155a3a41be..4efbe8e8c0 100644 --- a/include/vsg/app/WindowTraits.h +++ b/include/vsg/app/WindowTraits.h @@ -99,7 +99,7 @@ namespace vsg std::any systemConnection; protected: - virtual ~WindowTraits() {} + ~WindowTraits() override {} }; VSG_type_name(vsg::WindowTraits); diff --git a/include/vsg/state/GraphicsPipeline.h b/include/vsg/state/GraphicsPipeline.h index 6ace23c6c1..10d72f5430 100644 --- a/include/vsg/state/GraphicsPipeline.h +++ b/include/vsg/state/GraphicsPipeline.h @@ -128,7 +128,7 @@ namespace vsg virtual void release(); public: - virtual ~BindGraphicsPipeline(); + ~BindGraphicsPipeline() override; }; VSG_type_name(vsg::BindGraphicsPipeline); diff --git a/include/vsg/threading/ActivityStatus.h b/include/vsg/threading/ActivityStatus.h index bbcc18214f..c063b33c86 100644 --- a/include/vsg/threading/ActivityStatus.h +++ b/include/vsg/threading/ActivityStatus.h @@ -33,7 +33,7 @@ namespace vsg bool cancel() const noexcept { return !_active; } protected: - virtual ~ActivityStatus() {} + ~ActivityStatus() override {} std::atomic_bool _active; }; diff --git a/include/vsg/threading/Barrier.h b/include/vsg/threading/Barrier.h index 10f655e798..bdc1c03500 100644 --- a/include/vsg/threading/Barrier.h +++ b/include/vsg/threading/Barrier.h @@ -57,7 +57,7 @@ namespace vsg } protected: - virtual ~Barrier() {} + ~Barrier() override {} void _release() { diff --git a/include/vsg/threading/DeleteQueue.h b/include/vsg/threading/DeleteQueue.h index e77027cc24..511ddb72c1 100644 --- a/include/vsg/threading/DeleteQueue.h +++ b/include/vsg/threading/DeleteQueue.h @@ -122,7 +122,7 @@ namespace vsg size_t clear(); protected: - virtual ~DeleteQueue(); + ~DeleteQueue() override; std::mutex _mutex; std::condition_variable _cv; diff --git a/include/vsg/threading/FrameBlock.h b/include/vsg/threading/FrameBlock.h index 6d7d8f10be..ad38da2620 100644 --- a/include/vsg/threading/FrameBlock.h +++ b/include/vsg/threading/FrameBlock.h @@ -67,7 +67,7 @@ namespace vsg } protected: - virtual ~FrameBlock() {} + ~FrameBlock() override {} std::mutex _mutex; std::condition_variable _cv; diff --git a/include/vsg/threading/Latch.h b/include/vsg/threading/Latch.h index 328d36d48c..0fdc6eb082 100644 --- a/include/vsg/threading/Latch.h +++ b/include/vsg/threading/Latch.h @@ -84,7 +84,7 @@ namespace vsg int count() const { return _count.load(); } protected: - virtual ~Latch() {} + ~Latch() override {} std::atomic_int _count; std::mutex _mutex; diff --git a/include/vsg/threading/OperationThreads.h b/include/vsg/threading/OperationThreads.h index 7a6ecd9528..265ef515a5 100644 --- a/include/vsg/threading/OperationThreads.h +++ b/include/vsg/threading/OperationThreads.h @@ -53,7 +53,7 @@ namespace vsg ref_ptr status; protected: - virtual ~OperationThreads(); + ~OperationThreads() override; }; VSG_type_name(vsg::OperationThreads) From 685507ee9b0fa1550df5c0ab78685e8f34d563d1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 14:14:37 +0100 Subject: [PATCH 11/25] cppcheck fixes, bumped SO version as ABI changed a little --- CMakeLists.txt | 2 +- include/vsg/core/ScratchMemory.h | 2 +- include/vsg/vk/CommandBuffer.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 213141bc84..02a3e047f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(vsg DESCRIPTION "VulkanSceneGraph library" LANGUAGES CXX ) -set(VSG_SOVERSION 16) +set(VSG_SOVERSION 17) SET(VSG_RELEASE_CANDIDATE 0) set(Vulkan_MIN_VERSION 1.1.70.0) diff --git a/include/vsg/core/ScratchMemory.h b/include/vsg/core/ScratchMemory.h index 2eb0865ff6..25729da00d 100644 --- a/include/vsg/core/ScratchMemory.h +++ b/include/vsg/core/ScratchMemory.h @@ -37,7 +37,7 @@ namespace vsg ScratchMemory(const ScratchMemory&) = delete; ScratchMemory& operator=(const ScratchMemory&) = delete; - ~ScratchMemory() + ~ScratchMemory() override { delete[] buffer; } diff --git a/include/vsg/vk/CommandBuffer.h b/include/vsg/vk/CommandBuffer.h index 8c5ca3aa42..a4091d81d0 100644 --- a/include/vsg/vk/CommandBuffer.h +++ b/include/vsg/vk/CommandBuffer.h @@ -94,7 +94,7 @@ namespace vsg CommandBuffers buffers() const; protected: - ~RecordedCommandBuffers(); + ~RecordedCommandBuffers() override; mutable std::mutex _mutex; std::map> _orderedCommandBuffers; CommandBuffers _commandBuffers; From 08c0eba947c75f5d5220c021ae39dcc46bd709c1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 14:20:25 +0100 Subject: [PATCH 12/25] Clean up --- include/vsg/core/Data.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/include/vsg/core/Data.h b/include/vsg/core/Data.h index 338afbc481..4fc60b05c2 100644 --- a/include/vsg/core/Data.h +++ b/include/vsg/core/Data.h @@ -233,26 +233,6 @@ namespace vsg void _clear(); ModifiedCount _modifiedCount; - -#if 1 - public: - /// deprecated: provided for backwards compatibility, use Properties instead. - using Layout = Properties; - - /// deprecated: use data->properties = properties instead. - void setLayout(const Layout& layout) - { - VkFormat previous_format = properties.format; // temporary hack to keep applications that call setFormat(..) before setLayout(..) working - uint32_t previous_stride = properties.stride; - properties = layout; - if (properties.format == 0 && previous_format != 0) properties.format = previous_format; // temporary hack to keep existing applications working - if (properties.stride == 0 && previous_stride != 0) properties.stride = previous_stride; // make sure the layout has a valid stride. - } - /// deprecated: use data->properties - Layout& getLayout() { return properties; } - /// deprecated: use data->properties - const Layout& getLayout() const { return properties; } -#endif }; VSG_type_name(vsg::Data); From 28ad64d0b6e2522bb8e58be162e58bbbf2fa28d7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 15:35:35 +0100 Subject: [PATCH 13/25] cppcheck fixes --- include/vsg/commands/BindIndexBuffer.h | 2 +- include/vsg/commands/BindVertexBuffers.h | 2 +- include/vsg/commands/Commands.h | 2 +- include/vsg/commands/CopyAndReleaseBuffer.h | 2 +- include/vsg/commands/CopyAndReleaseImage.h | 2 +- include/vsg/commands/Event.h | 2 +- include/vsg/commands/ExecuteCommands.h | 2 +- include/vsg/commands/NextSubPass.h | 2 +- include/vsg/commands/PipelineBarrier.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/vsg/commands/BindIndexBuffer.h b/include/vsg/commands/BindIndexBuffer.h index 42e94a44cd..400b238f2c 100644 --- a/include/vsg/commands/BindIndexBuffer.h +++ b/include/vsg/commands/BindIndexBuffer.h @@ -47,7 +47,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~BindIndexBuffer(); + ~BindIndexBuffer() override; }; VSG_type_name(vsg::BindIndexBuffer); diff --git a/include/vsg/commands/BindVertexBuffers.h b/include/vsg/commands/BindVertexBuffers.h index 69908920fb..a9cfd38967 100644 --- a/include/vsg/commands/BindVertexBuffers.h +++ b/include/vsg/commands/BindVertexBuffers.h @@ -42,7 +42,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~BindVertexBuffers(); + ~BindVertexBuffers() override; vk_buffer _vulkanData; }; diff --git a/include/vsg/commands/Commands.h b/include/vsg/commands/Commands.h index 9ecf037f41..d87eed3a0d 100644 --- a/include/vsg/commands/Commands.h +++ b/include/vsg/commands/Commands.h @@ -57,7 +57,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~Commands(); + ~Commands() override; }; VSG_type_name(vsg::Commands); diff --git a/include/vsg/commands/CopyAndReleaseBuffer.h b/include/vsg/commands/CopyAndReleaseBuffer.h index ddd020575f..5354eb0b7b 100644 --- a/include/vsg/commands/CopyAndReleaseBuffer.h +++ b/include/vsg/commands/CopyAndReleaseBuffer.h @@ -36,7 +36,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~CopyAndReleaseBuffer(); + ~CopyAndReleaseBuffer() override; struct CopyData { diff --git a/include/vsg/commands/CopyAndReleaseImage.h b/include/vsg/commands/CopyAndReleaseImage.h index a400aa7d99..c1b9a6e5f9 100644 --- a/include/vsg/commands/CopyAndReleaseImage.h +++ b/include/vsg/commands/CopyAndReleaseImage.h @@ -58,7 +58,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~CopyAndReleaseImage(); + ~CopyAndReleaseImage() override; void _copyDirectly(ref_ptr data, ref_ptr dest, uint32_t numMipMapLevels); diff --git a/include/vsg/commands/Event.h b/include/vsg/commands/Event.h index 92fe0ce9d6..9ce757192c 100644 --- a/include/vsg/commands/Event.h +++ b/include/vsg/commands/Event.h @@ -36,7 +36,7 @@ namespace vsg VkResult status(); protected: - virtual ~Event(); + ~Event() override; VkEvent _event; ref_ptr _device; diff --git a/include/vsg/commands/ExecuteCommands.h b/include/vsg/commands/ExecuteCommands.h index 76ce6f34b7..81d1668e8f 100644 --- a/include/vsg/commands/ExecuteCommands.h +++ b/include/vsg/commands/ExecuteCommands.h @@ -37,7 +37,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~ExecuteCommands(); + ~ExecuteCommands() override; struct CommandGraphAndBuffer { diff --git a/include/vsg/commands/NextSubPass.h b/include/vsg/commands/NextSubPass.h index 5db9581a5b..5c032eadee 100644 --- a/include/vsg/commands/NextSubPass.h +++ b/include/vsg/commands/NextSubPass.h @@ -32,7 +32,7 @@ namespace vsg VkSubpassContents contents = VK_SUBPASS_CONTENTS_INLINE; protected: - virtual ~NextSubPass(); + ~NextSubPass() override; }; VSG_type_name(vsg::NextSubPass); diff --git a/include/vsg/commands/PipelineBarrier.h b/include/vsg/commands/PipelineBarrier.h index 4631d3be71..d5a563203a 100644 --- a/include/vsg/commands/PipelineBarrier.h +++ b/include/vsg/commands/PipelineBarrier.h @@ -152,7 +152,7 @@ namespace vsg ImageMemoryBarriers imageMemoryBarriers; protected: - virtual ~PipelineBarrier(); + ~PipelineBarrier() override; }; VSG_type_name(vsg::PipelineBarrier); From dbdbf5b0d47a1887ae5363b08320ec8e42e91888 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 May 2026 16:21:34 +0100 Subject: [PATCH 14/25] cppcheck fixes --- include/vsg/io/DatabasePager.h | 4 ++-- include/vsg/io/Options.h | 2 +- include/vsg/state/BindDescriptorSet.h | 2 +- include/vsg/state/ComputePipeline.h | 2 +- include/vsg/state/DescriptorSet.h | 2 +- include/vsg/state/DescriptorSetLayout.h | 2 +- include/vsg/state/GraphicsPipeline.h | 2 +- include/vsg/state/PipelineLayout.h | 2 +- include/vsg/state/Sampler.h | 2 +- include/vsg/state/ShaderModule.h | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/vsg/io/DatabasePager.h b/include/vsg/io/DatabasePager.h index 667a896753..a0fa424117 100644 --- a/include/vsg/io/DatabasePager.h +++ b/include/vsg/io/DatabasePager.h @@ -112,7 +112,7 @@ namespace vsg Nodes take_all(CompileResult& result); protected: - virtual ~DatabaseQueue(); + ~DatabaseQueue() override; std::mutex _mutex; std::condition_variable _cv; @@ -168,7 +168,7 @@ namespace vsg ref_ptr deleteQueue; protected: - virtual ~DatabasePager(); + ~DatabasePager() override; void requestDiscarded(PagedLOD* plod); diff --git a/include/vsg/io/Options.h b/include/vsg/io/Options.h index 90bd9e3974..981304123a 100644 --- a/include/vsg/io/Options.h +++ b/include/vsg/io/Options.h @@ -122,7 +122,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Options(); + ~Options() override; }; VSG_type_name(vsg::Options); diff --git a/include/vsg/state/BindDescriptorSet.h b/include/vsg/state/BindDescriptorSet.h index a27b7b4408..9f975c1148 100644 --- a/include/vsg/state/BindDescriptorSet.h +++ b/include/vsg/state/BindDescriptorSet.h @@ -151,7 +151,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~BindDescriptorSet() {} + ~BindDescriptorSet() override {} struct VulkanData { diff --git a/include/vsg/state/ComputePipeline.h b/include/vsg/state/ComputePipeline.h index 923f027a99..049977cce2 100644 --- a/include/vsg/state/ComputePipeline.h +++ b/include/vsg/state/ComputePipeline.h @@ -50,7 +50,7 @@ namespace vsg struct Implementation : public Inherit { Implementation(Context& context, Device* device, const PipelineLayout* pipelineLayout, const ShaderStage* shaderStage); - virtual ~Implementation(); + ~Implementation() override; VkPipeline _pipeline; ref_ptr _device; diff --git a/include/vsg/state/DescriptorSet.h b/include/vsg/state/DescriptorSet.h index 32b1238a73..7ea4c69c2a 100644 --- a/include/vsg/state/DescriptorSet.h +++ b/include/vsg/state/DescriptorSet.h @@ -76,7 +76,7 @@ namespace vsg static void recycle(ref_ptr& dsi); protected: - virtual ~Implementation(); + ~Implementation() override; friend DescriptorPool; diff --git a/include/vsg/state/DescriptorSetLayout.h b/include/vsg/state/DescriptorSetLayout.h index 98d6e57c04..068c257f0f 100644 --- a/include/vsg/state/DescriptorSetLayout.h +++ b/include/vsg/state/DescriptorSetLayout.h @@ -70,7 +70,7 @@ namespace vsg { Implementation(Device* device, VkDescriptorSetLayoutCreateFlags createFlags, const DescriptorSetLayoutBindings& descriptorSetLayoutBindings, const DescriptorSetLayoutBindingFlags& descriptorSetLayoutBindingFlags); - virtual ~Implementation(); + ~Implementation() override; ref_ptr _device; VkDescriptorSetLayout _descriptorSetLayout; diff --git a/include/vsg/state/GraphicsPipeline.h b/include/vsg/state/GraphicsPipeline.h index 10d72f5430..0d276b4897 100644 --- a/include/vsg/state/GraphicsPipeline.h +++ b/include/vsg/state/GraphicsPipeline.h @@ -94,7 +94,7 @@ namespace vsg { Implementation(Context& context, Device* device, const RenderPass* renderPass, const PipelineLayout* pipelineLayout, const ShaderStages& shaderStages, const GraphicsPipelineStates& pipelineStates, uint32_t subpass); - virtual ~Implementation(); + ~Implementation() override; GraphicsPipelineStates _pipelineStates; VkPipeline _pipeline; diff --git a/include/vsg/state/PipelineLayout.h b/include/vsg/state/PipelineLayout.h index 747d46fbfe..d6567489d7 100644 --- a/include/vsg/state/PipelineLayout.h +++ b/include/vsg/state/PipelineLayout.h @@ -60,7 +60,7 @@ namespace vsg { Implementation(Device* device, const DescriptorSetLayouts& descriptorSetLayouts, const PushConstantRanges& pushConstantRanges, VkPipelineLayoutCreateFlags flags = 0); - virtual ~Implementation(); + ~Implementation() override; VkPipelineLayout _pipelineLayout; diff --git a/include/vsg/state/Sampler.h b/include/vsg/state/Sampler.h index d85d288e21..0706afb4ca 100644 --- a/include/vsg/state/Sampler.h +++ b/include/vsg/state/Sampler.h @@ -65,7 +65,7 @@ namespace vsg { Implementation(Device* device, const VkSamplerCreateInfo& createSamplerInfo); - virtual ~Implementation(); + ~Implementation() override; VkSampler _sampler; ref_ptr _device; diff --git a/include/vsg/state/ShaderModule.h b/include/vsg/state/ShaderModule.h index 7ce0923cf3..4cc75d7ee6 100644 --- a/include/vsg/state/ShaderModule.h +++ b/include/vsg/state/ShaderModule.h @@ -111,7 +111,7 @@ namespace vsg { Implementation(Device* device, ShaderModule* shader); - virtual ~Implementation(); + ~Implementation() override; VkShaderModule _shaderModule; ref_ptr _device; From 3cb19dfdbe15f1e83f7f6e7b35d66853805de83b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 09:52:53 +0100 Subject: [PATCH 15/25] cppcheck fixes --- include/vsg/app/CompileManager.h | 2 +- include/vsg/app/CompileTraversal.h | 2 +- include/vsg/utils/GpuAnnotation.h | 2 +- include/vsg/utils/ShaderCompiler.h | 2 +- include/vsg/utils/ShaderSet.h | 2 +- include/vsg/utils/SharedObjects.h | 2 +- include/vsg/vk/DeviceMemory.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/vsg/app/CompileManager.h b/include/vsg/app/CompileManager.h index fb9a6d6827..fefdd3e25e 100644 --- a/include/vsg/app/CompileManager.h +++ b/include/vsg/app/CompileManager.h @@ -91,7 +91,7 @@ namespace vsg std::atomic_uint failedCompileCount{0}; protected: - ~CompileManager(); + ~CompileManager() override; using CompileTraversals = ThreadSafeQueue>; size_t numCompileTraversals = 0; diff --git a/include/vsg/app/CompileTraversal.h b/include/vsg/app/CompileTraversal.h index fa9fdf1809..04db232b90 100644 --- a/include/vsg/app/CompileTraversal.h +++ b/include/vsg/app/CompileTraversal.h @@ -103,7 +103,7 @@ namespace vsg void apply(View& view) override; protected: - ~CompileTraversal(); + ~CompileTraversal() override; void add(ref_ptr context, Framebuffer& framebuffer, ref_ptr transferTask, ref_ptr view, const ResourceRequirements& resourceRequirements); void addViewDependentState(ViewDependentState& viewDependentState, ref_ptr device, ref_ptr transferTask, const ResourceRequirements& resourceRequirements); diff --git a/include/vsg/utils/GpuAnnotation.h b/include/vsg/utils/GpuAnnotation.h index 8c4d08c486..6d85e3c7ba 100644 --- a/include/vsg/utils/GpuAnnotation.h +++ b/include/vsg/utils/GpuAnnotation.h @@ -40,7 +40,7 @@ namespace vsg void leave(const vsg::SourceLocation* sl, uint64_t& reference, CommandBuffer& commandBuffer, const Object* object) const override; protected: - virtual ~GpuAnnotation(); + ~GpuAnnotation() override; }; VSG_type_name(vsg::GpuAnnotation); diff --git a/include/vsg/utils/ShaderCompiler.h b/include/vsg/utils/ShaderCompiler.h index d418011c8f..62ac2ca362 100644 --- a/include/vsg/utils/ShaderCompiler.h +++ b/include/vsg/utils/ShaderCompiler.h @@ -16,7 +16,7 @@ namespace vsg { public: ShaderCompiler(); - virtual ~ShaderCompiler(); + ~ShaderCompiler() override; /// return true if shader compilation is supported by this build of VulkanSceneGraph /// you can also use the VSG_SUPPORTS_ShaderCompiler define provided by include/vsg/core/Version.h diff --git a/include/vsg/utils/ShaderSet.h b/include/vsg/utils/ShaderSet.h index e3bf15ac4d..fe4c74f0ed 100644 --- a/include/vsg/utils/ShaderSet.h +++ b/include/vsg/utils/ShaderSet.h @@ -196,7 +196,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~ShaderSet(); + ~ShaderSet() override; AttributeBinding _nullAttributeBinding; DescriptorBinding _nullDescriptorBinding; diff --git a/include/vsg/utils/SharedObjects.h b/include/vsg/utils/SharedObjects.h index dbf4a1c52b..23f3dd76d6 100644 --- a/include/vsg/utils/SharedObjects.h +++ b/include/vsg/utils/SharedObjects.h @@ -73,7 +73,7 @@ namespace vsg void report(vsg::LogOutput& output); protected: - virtual ~SharedObjects(); + ~SharedObjects() override; mutable std::recursive_mutex _mutex; std::map> _defaults; diff --git a/include/vsg/vk/DeviceMemory.h b/include/vsg/vk/DeviceMemory.h index f349ac7bf6..b7912d3562 100644 --- a/include/vsg/vk/DeviceMemory.h +++ b/include/vsg/vk/DeviceMemory.h @@ -98,7 +98,7 @@ namespace vsg } template - static ref_ptr create(DeviceMemory* deviceMemory, VkDeviceSize offset, VkMemoryMapFlags flags, Data::Properties properties, Args... args) + static ref_ptr create(DeviceMemory* deviceMemory, VkDeviceSize offset, VkMemoryMapFlags flags, const Data::Properties& properties, Args... args) { auto data = ref_ptr(new MappedData(deviceMemory, offset, flags, args...)); data->properties = properties; From 9438840c65169ee8a8615fa0b36d17a9e833330e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 10:13:13 +0100 Subject: [PATCH 16/25] cppcheck fixes --- include/vsg/commands/Event.h | 6 +++--- include/vsg/core/External.h | 2 +- include/vsg/core/IntrusiveAllocator.h | 2 +- include/vsg/core/MipmapLayout.h | 2 +- include/vsg/core/Objects.h | 2 +- include/vsg/state/QueryPool.h | 2 +- src/vsg/utils/PolytopeIntersector.cpp | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/vsg/commands/Event.h b/include/vsg/commands/Event.h index 9ce757192c..d580a46cff 100644 --- a/include/vsg/commands/Event.h +++ b/include/vsg/commands/Event.h @@ -57,7 +57,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~SetEvent(); + ~SetEvent() override; }; VSG_type_name(vsg::SetEvent); @@ -73,7 +73,7 @@ namespace vsg void record(CommandBuffer& commandBuffer) const override; protected: - virtual ~ResetEvent(); + ~ResetEvent() override; }; VSG_type_name(vsg::ResetEvent); @@ -107,7 +107,7 @@ namespace vsg ImageMemoryBarriers imageMemoryBarriers; protected: - virtual ~WaitEvents(); + ~WaitEvents() override; }; VSG_type_name(vsg::WaitEvents); diff --git a/include/vsg/core/External.h b/include/vsg/core/External.h index 47a8aa6235..d015261eaa 100644 --- a/include/vsg/core/External.h +++ b/include/vsg/core/External.h @@ -59,7 +59,7 @@ namespace vsg void add(const Path& filename, ref_ptr object = {}) { entries[filename] = object; } protected: - virtual ~External(); + ~External() override; }; VSG_type_name(vsg::External); diff --git a/include/vsg/core/IntrusiveAllocator.h b/include/vsg/core/IntrusiveAllocator.h index 1603bd9fda..39dd291142 100644 --- a/include/vsg/core/IntrusiveAllocator.h +++ b/include/vsg/core/IntrusiveAllocator.h @@ -48,7 +48,7 @@ namespace vsg explicit IntrusiveAllocator(size_t in_defaultAlignment = 8); explicit IntrusiveAllocator(std::unique_ptr in_nestedAllocator, size_t in_defaultAlignment = 8); - ~IntrusiveAllocator(); + ~IntrusiveAllocator() override; void report(std::ostream& out) const override; diff --git a/include/vsg/core/MipmapLayout.h b/include/vsg/core/MipmapLayout.h index 968114255f..51d91bae76 100644 --- a/include/vsg/core/MipmapLayout.h +++ b/include/vsg/core/MipmapLayout.h @@ -47,7 +47,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~MipmapLayout(); + ~MipmapLayout() override; }; VSG_type_name(vsg::MipmapLayout); diff --git a/include/vsg/core/Objects.h b/include/vsg/core/Objects.h index 292a6c60ae..5618bd94fd 100644 --- a/include/vsg/core/Objects.h +++ b/include/vsg/core/Objects.h @@ -48,7 +48,7 @@ namespace vsg } protected: - virtual ~Objects(); + ~Objects() override; }; VSG_type_name(vsg::Objects); diff --git a/include/vsg/state/QueryPool.h b/include/vsg/state/QueryPool.h index 7527fd3aa5..54ba71a71c 100644 --- a/include/vsg/state/QueryPool.h +++ b/include/vsg/state/QueryPool.h @@ -51,7 +51,7 @@ namespace vsg void compile(Context& context); protected: - ~QueryPool(); + ~QueryPool() override; VkQueryPool _queryPool{}; ref_ptr _device{}; diff --git a/src/vsg/utils/PolytopeIntersector.cpp b/src/vsg/utils/PolytopeIntersector.cpp index 14f4525b33..e5d3a04245 100644 --- a/src/vsg/utils/PolytopeIntersector.cpp +++ b/src/vsg/utils/PolytopeIntersector.cpp @@ -220,7 +220,7 @@ PolytopeIntersector::PolytopeIntersector(const Camera& camera, double xMin, doub clipspace.push_back(dplane(0.0, 0.0, 1.0, ndc_far)); // far vsg::Polytope eyespace; - for (auto& pl : clipspace) + for (const auto& pl : clipspace) { eyespace.push_back(pl * projectionMatrix); } @@ -228,7 +228,7 @@ PolytopeIntersector::PolytopeIntersector(const Camera& camera, double xMin, doub _polytopeStack.push_back(eyespace); vsg::Polytope worldspace; - for (auto& pl : eyespace) + for (const auto& pl : eyespace) { worldspace.push_back(pl * viewMatrix); } @@ -276,7 +276,7 @@ void PolytopeIntersector::pushTransform(const Transform& transform) const auto& worldspace = _polytopeStack.front(); Polytope localspace; - for (auto& pl : worldspace) + for (const auto& pl : worldspace) { localspace.push_back(pl * localToWorld); } From 5dcb224f1e1a27d20d00a0e921c08ff9cbdd6195 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 12:38:20 +0100 Subject: [PATCH 17/25] cppcheck fixes --- cmake/cppcheck-suppression-list.txt | 1 + include/vsg/core/IntrusiveAllocator.h | 10 +++++++--- include/vsg/lighting/AmbientLight.h | 2 +- include/vsg/lighting/DirectionalLight.h | 2 +- include/vsg/lighting/Light.h | 2 +- include/vsg/lighting/PointLight.h | 2 +- include/vsg/lighting/ShadowSettings.h | 2 +- include/vsg/lighting/SpotLight.h | 2 +- include/vsg/raytracing/AccelerationStructure.h | 2 +- include/vsg/raytracing/RayTracingPipeline.h | 6 +++--- include/vsg/raytracing/RayTracingShaderGroup.h | 2 +- include/vsg/utils/CommandLine.h | 2 +- 12 files changed, 20 insertions(+), 15 deletions(-) diff --git a/cmake/cppcheck-suppression-list.txt b/cmake/cppcheck-suppression-list.txt index e08ee2adca..c699b6b3b9 100644 --- a/cmake/cppcheck-suppression-list.txt +++ b/cmake/cppcheck-suppression-list.txt @@ -152,6 +152,7 @@ arrayIndexOutOfBounds:*/include/vsg/vk/State.h // suppress warnings about intentional code usage or where cppcheck just hasn't got a clue about how templates are used... knownConditionTrueFalse:*/src/vsg/utils/Builder.cpp knownConditionTrueFalse:*/include/vsg/utils/CommandLine.h +knownConditionTrueFalse:*/include/vsg/utils/Inherit.h // suppress warning about initializtion. useInitializationList:*/include/vsg/core/ScratchMemory.h diff --git a/include/vsg/core/IntrusiveAllocator.h b/include/vsg/core/IntrusiveAllocator.h index 39dd291142..51c68cedf8 100644 --- a/include/vsg/core/IntrusiveAllocator.h +++ b/include/vsg/core/IntrusiveAllocator.h @@ -104,9 +104,13 @@ namespace vsg next(static_cast(in_next)), status(in_status) {} - Element() = default; - Element(const Element&) = default; - Element& operator=(const Element&) = default; + Element() : index(0) {} + Element(const Element& rhs) : index(rhs.index) {} + Element& operator=(const Element& rhs) + { + index = rhs.index; + return *this; + } }; struct FreeList diff --git a/include/vsg/lighting/AmbientLight.h b/include/vsg/lighting/AmbientLight.h index 9417bda87e..bcb22f8a6f 100644 --- a/include/vsg/lighting/AmbientLight.h +++ b/include/vsg/lighting/AmbientLight.h @@ -33,7 +33,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~AmbientLight() {} + ~AmbientLight() override {} }; VSG_type_name(vsg::AmbientLight); diff --git a/include/vsg/lighting/DirectionalLight.h b/include/vsg/lighting/DirectionalLight.h index 890c69721a..4ff000e7e9 100644 --- a/include/vsg/lighting/DirectionalLight.h +++ b/include/vsg/lighting/DirectionalLight.h @@ -37,7 +37,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~DirectionalLight() {} + ~DirectionalLight() override {} }; VSG_type_name(vsg::DirectionalLight); diff --git a/include/vsg/lighting/Light.h b/include/vsg/lighting/Light.h index bf6887be4a..cd2f44e7bf 100644 --- a/include/vsg/lighting/Light.h +++ b/include/vsg/lighting/Light.h @@ -41,7 +41,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~Light() {} + ~Light() override {} }; VSG_type_name(vsg::Light); diff --git a/include/vsg/lighting/PointLight.h b/include/vsg/lighting/PointLight.h index fd8fca3cef..7462d0f280 100644 --- a/include/vsg/lighting/PointLight.h +++ b/include/vsg/lighting/PointLight.h @@ -37,7 +37,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~PointLight() {} + ~PointLight() override {} }; VSG_type_name(vsg::PointLight); diff --git a/include/vsg/lighting/ShadowSettings.h b/include/vsg/lighting/ShadowSettings.h index 055e619297..2e36cc120e 100644 --- a/include/vsg/lighting/ShadowSettings.h +++ b/include/vsg/lighting/ShadowSettings.h @@ -33,7 +33,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~ShadowSettings() {} + ~ShadowSettings() override {} }; VSG_type_name(vsg::ShadowSettings); diff --git a/include/vsg/lighting/SpotLight.h b/include/vsg/lighting/SpotLight.h index 614d8de386..b8d8db3244 100644 --- a/include/vsg/lighting/SpotLight.h +++ b/include/vsg/lighting/SpotLight.h @@ -40,7 +40,7 @@ namespace vsg void write(Output& output) const override; protected: - virtual ~SpotLight() {} + ~SpotLight() override {} }; VSG_type_name(vsg::SpotLight); diff --git a/include/vsg/raytracing/AccelerationStructure.h b/include/vsg/raytracing/AccelerationStructure.h index 40773a32a7..f3cd750734 100644 --- a/include/vsg/raytracing/AccelerationStructure.h +++ b/include/vsg/raytracing/AccelerationStructure.h @@ -37,7 +37,7 @@ namespace vsg VkDeviceSize requiredScratchSize() const { return _requiredBuildScratchSize; } protected: - virtual ~AccelerationStructure(); + ~AccelerationStructure() override; VkAccelerationStructureKHR _accelerationStructure; VkAccelerationStructureCreateInfoKHR _accelerationStructureInfo; diff --git a/include/vsg/raytracing/RayTracingPipeline.h b/include/vsg/raytracing/RayTracingPipeline.h index 84fa32ef35..ec8910174c 100644 --- a/include/vsg/raytracing/RayTracingPipeline.h +++ b/include/vsg/raytracing/RayTracingPipeline.h @@ -56,12 +56,12 @@ namespace vsg VkPipeline vk(uint32_t deviceID) const { return _implementation[deviceID]->_pipeline; } protected: - virtual ~RayTracingPipeline(); + ~RayTracingPipeline() override; struct Implementation : public Inherit { Implementation(Context& context, RayTracingPipeline* rayTracingPipeline); - virtual ~Implementation(); + ~Implementation() override; VkPipeline _pipeline; @@ -103,7 +103,7 @@ namespace vsg virtual void release(); public: - virtual ~BindRayTracingPipeline(); + ~BindRayTracingPipeline() override; ref_ptr _pipeline; }; diff --git a/include/vsg/raytracing/RayTracingShaderGroup.h b/include/vsg/raytracing/RayTracingShaderGroup.h index 068c851660..0c3f5b50fb 100644 --- a/include/vsg/raytracing/RayTracingShaderGroup.h +++ b/include/vsg/raytracing/RayTracingShaderGroup.h @@ -38,7 +38,7 @@ namespace vsg ref_ptr bufferInfo; protected: - virtual ~RayTracingShaderGroup(); + ~RayTracingShaderGroup() override; }; VSG_type_name(vsg::RayTracingShaderGroup); diff --git a/include/vsg/utils/CommandLine.h b/include/vsg/utils/CommandLine.h index 7f24c00f46..4594e65af7 100644 --- a/include/vsg/utils/CommandLine.h +++ b/include/vsg/utils/CommandLine.h @@ -155,7 +155,7 @@ namespace vsg bool read(std::initializer_list matches, Args&... args) { bool result = false; - for (auto str : matches) result = read(str, args...) | result; + for (auto str : matches) result = read(str, args...) || result; return result; } From dbf1221d3df91d93d6eed29c21ab7216383dcc1f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 12:46:59 +0100 Subject: [PATCH 18/25] Fix cppcheck warnings, and suppress inappropriate ones. --- cmake/cppcheck-suppression-list.txt | 4 ++++ include/vsg/state/ViewDependentState.h | 2 +- include/vsg/utils/Builder.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/cppcheck-suppression-list.txt b/cmake/cppcheck-suppression-list.txt index c699b6b3b9..0728930784 100644 --- a/cmake/cppcheck-suppression-list.txt +++ b/cmake/cppcheck-suppression-list.txt @@ -243,3 +243,7 @@ constVariablePointer:*/src/vsg/app/SecondaryCommandGraph.cpp // suppress inappropriate warning passedByValue:*/src/vsg/vk/Device.cpp passedByValue:*/src/vsg/vk/Instance.cpp + +// suppress inapproach functionStatic warnings +functionStatic:*/include/vsg/io/Output.h +functionStatic:*/include/vsg/io/Input.h diff --git a/include/vsg/state/ViewDependentState.h b/include/vsg/state/ViewDependentState.h index 76b75922f1..ded1e84ca7 100644 --- a/include/vsg/state/ViewDependentState.h +++ b/include/vsg/state/ViewDependentState.h @@ -175,7 +175,7 @@ namespace vsg mutable std::vector shadowMaps; protected: - ~ViewDependentState(); + ~ViewDependentState() override; }; VSG_type_name(vsg::ViewDependentState); diff --git a/include/vsg/utils/Builder.h b/include/vsg/utils/Builder.h index 99b9eccf18..5004515750 100644 --- a/include/vsg/utils/Builder.h +++ b/include/vsg/utils/Builder.h @@ -113,7 +113,7 @@ namespace vsg Builder(const Builder& rhs) = delete; Builder& operator=(const Builder& rhs) = delete; - ~Builder(); + ~Builder() override; bool verbose = false; ref_ptr options; From 4d57d60d2daad616cb135c86fad6866a4f048f6d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 13:33:00 +0100 Subject: [PATCH 19/25] cppcheck suggest change --- include/vsg/app/WindowResizeHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vsg/app/WindowResizeHandler.h b/include/vsg/app/WindowResizeHandler.h index 87be5b3efa..b579af1a04 100644 --- a/include/vsg/app/WindowResizeHandler.h +++ b/include/vsg/app/WindowResizeHandler.h @@ -53,7 +53,7 @@ namespace vsg WindowResizeHandler(); template - T scale_parameter(T original, R extentOriginal, R extentNew) + static T scale_parameter(T original, R extentOriginal, R extentNew) { if (original == static_cast(extentOriginal)) return static_cast(extentNew); return static_cast(static_cast(original) * static_cast(extentNew) / static_cast(extentOriginal) + 0.5f); From 5b507e84ccd57ea323422fd0f65e744009378b15 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 14:19:18 +0100 Subject: [PATCH 20/25] cppcheck suggested change --- include/vsg/io/JSONParser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vsg/io/JSONParser.h b/include/vsg/io/JSONParser.h index 90c72d7bb3..c713477a8a 100644 --- a/include/vsg/io/JSONParser.h +++ b/include/vsg/io/JSONParser.h @@ -82,7 +82,7 @@ namespace vsg warnings.push_back(vsg::make_string("Parsing error at [", line, ":", column, "], pos = ", pos, " [ ", lineEnclosingPosition(pos), " ]. ", std::forward(args)...)); } - inline bool white_space(char c) const + static inline bool white_space(char c) const { return (c == ' ' || c == '\t' || c == '\r' || c == '\n'); } From a85afb1c2ca79defe645295733d60ddc2ee30196 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 15:48:32 +0100 Subject: [PATCH 21/25] Build fix --- include/vsg/io/JSONParser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vsg/io/JSONParser.h b/include/vsg/io/JSONParser.h index c713477a8a..024c86a55a 100644 --- a/include/vsg/io/JSONParser.h +++ b/include/vsg/io/JSONParser.h @@ -82,7 +82,7 @@ namespace vsg warnings.push_back(vsg::make_string("Parsing error at [", line, ":", column, "], pos = ", pos, " [ ", lineEnclosingPosition(pos), " ]. ", std::forward(args)...)); } - static inline bool white_space(char c) const + static inline bool white_space(char c) { return (c == ' ' || c == '\t' || c == '\r' || c == '\n'); } From 179c85ca6f504bb10730d96155ab71743a3a8009 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 9 May 2026 15:51:20 +0100 Subject: [PATCH 22/25] Quietened erroneous warning --- cmake/cppcheck-suppression-list.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cppcheck-suppression-list.txt b/cmake/cppcheck-suppression-list.txt index 0728930784..3d4233283e 100644 --- a/cmake/cppcheck-suppression-list.txt +++ b/cmake/cppcheck-suppression-list.txt @@ -152,7 +152,7 @@ arrayIndexOutOfBounds:*/include/vsg/vk/State.h // suppress warnings about intentional code usage or where cppcheck just hasn't got a clue about how templates are used... knownConditionTrueFalse:*/src/vsg/utils/Builder.cpp knownConditionTrueFalse:*/include/vsg/utils/CommandLine.h -knownConditionTrueFalse:*/include/vsg/utils/Inherit.h +knownConditionTrueFalse:*/include/vsg/core/Inherit.h // suppress warning about initializtion. useInitializationList:*/include/vsg/core/ScratchMemory.h From 0f262fe483848514894b799b905ae356fecc56d2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 10 May 2026 10:43:12 +0100 Subject: [PATCH 23/25] cppcheck fixes --- cmake/cppcheck-suppression-list.txt | 19 ++++++++++++++++++- include/vsg/utils/TracyInstrumentation.h | 2 +- src/vsg/app/Viewer.cpp | 4 ++-- src/vsg/commands/ExecuteCommands.cpp | 2 +- src/vsg/state/ViewDependentState.cpp | 2 +- src/vsg/utils/ComputeBounds.cpp | 4 ++-- src/vsg/utils/ShaderCompiler.cpp | 4 +--- 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/cmake/cppcheck-suppression-list.txt b/cmake/cppcheck-suppression-list.txt index 3d4233283e..d25ad2cce2 100644 --- a/cmake/cppcheck-suppression-list.txt +++ b/cmake/cppcheck-suppression-list.txt @@ -244,6 +244,23 @@ constVariablePointer:*/src/vsg/app/SecondaryCommandGraph.cpp passedByValue:*/src/vsg/vk/Device.cpp passedByValue:*/src/vsg/vk/Instance.cpp -// suppress inapproach functionStatic warnings +// suppress inappropriate warnings functionStatic:*/include/vsg/io/Output.h functionStatic:*/include/vsg/io/Input.h +functionStatic:*/src/vsg/app/CompileManager.h +functionStatic:*/include/vsg/app/RecordTraversal.h +functionStatic:*/include/vsg/io/VSG.h +functionStatic:*/include/vsg/io/json.h +functionStatic:*/include/vsg/io/txt.h +functionStatic:*/include/vsg/io/tile.h +functionStatic:*/include/vsg/state/QueryPool.h +functionStatic:*/include/vsg/state/ArrayState.h +functionStatic:*/include/vsg/text/StandardLayout.h +functionStatic:*/include/vsg/utils/Builder.h +functionStatic:*/include/vsg/utils/ShaderCompiler.h +functionStatic:*/ +functionStatic:*/ + + +// suppress inappropriate warnings +suspiciousFloatingPointCast:*/src/vsg/maths/maths_transform.cpp diff --git a/include/vsg/utils/TracyInstrumentation.h b/include/vsg/utils/TracyInstrumentation.h index 1d6bd86132..f552cdebd8 100644 --- a/include/vsg/utils/TracyInstrumentation.h +++ b/include/vsg/utils/TracyInstrumentation.h @@ -80,7 +80,7 @@ namespace vsg mutable std::map, std::pair> ctxMap; protected: - ~TracyContexts() + ~TracyContexts() override { for (auto itr = ctxMap.begin(); itr != ctxMap.end(); ++itr) { diff --git a/src/vsg/app/Viewer.cpp b/src/vsg/app/Viewer.cpp index f1da140180..3c186b14a3 100644 --- a/src/vsg/app/Viewer.cpp +++ b/src/vsg/app/Viewer.cpp @@ -92,7 +92,7 @@ void Viewer::removeWindow(ref_ptr window) CommandGraphs commandGraphs; for (const auto& task : recordAndSubmitTasks) { - for (auto& cg : task->commandGraphs) + for (const auto& cg : task->commandGraphs) { if (cg->window != window) commandGraphs.push_back(cg); } @@ -582,7 +582,7 @@ void Viewer::addRecordAndSubmitTaskAndPresentation(CommandGraphs commandGraphs) CommandGraphs combinedCommandGraphs; for (const auto& task : recordAndSubmitTasks) { - for (auto& cg : task->commandGraphs) + for (const auto& cg : task->commandGraphs) { combinedCommandGraphs.push_back(cg); } diff --git a/src/vsg/commands/ExecuteCommands.cpp b/src/vsg/commands/ExecuteCommands.cpp index 5aa2821563..cb17b008b0 100644 --- a/src/vsg/commands/ExecuteCommands.cpp +++ b/src/vsg/commands/ExecuteCommands.cpp @@ -71,7 +71,7 @@ void ExecuteCommands::record(CommandBuffer& commandBuffer) const std::scoped_lock lock(_mutex); std::vector vk_commandBuffers; - for (auto& entry : _commandGraphsAndBuffers) + for (const auto& entry : _commandGraphsAndBuffers) { if (entry.cb) vk_commandBuffers.push_back(*entry.cb); } diff --git a/src/vsg/state/ViewDependentState.cpp b/src/vsg/state/ViewDependentState.cpp index 801cd28ff4..0d194f9fbc 100644 --- a/src/vsg/state/ViewDependentState.cpp +++ b/src/vsg/state/ViewDependentState.cpp @@ -658,7 +658,7 @@ void ViewDependentState::traverse(RecordTraversal& rt) const dbox eyeSpaceRegionBounds; for (auto& [mv, regionOfInterest] : rt.regionsOfInterest) { - for (auto& v : regionOfInterest->points) + for (const auto& v : regionOfInterest->points) { eyeSpaceRegionBounds.add(mv * v); } diff --git a/src/vsg/utils/ComputeBounds.cpp b/src/vsg/utils/ComputeBounds.cpp index 11fed2b290..a055996bca 100644 --- a/src/vsg/utils/ComputeBounds.cpp +++ b/src/vsg/utils/ComputeBounds.cpp @@ -302,7 +302,7 @@ void ComputeBounds::add(const dbox& bb) } else { - auto& matrix = matrixStack.back(); + const auto& matrix = matrixStack.back(); bounds.add(matrix * bb.min); bounds.add(matrix * dvec3(bb.max.x, bb.min.y, bb.min.z)); bounds.add(matrix * dvec3(bb.max.x, bb.max.y, bb.min.z)); @@ -323,7 +323,7 @@ void ComputeBounds::add(const dsphere& bs) } else { - auto& matrix = matrixStack.back(); + const auto& matrix = matrixStack.back(); bounds.add(matrix * dvec3(bs.center.x - bs.radius, bs.center.y - bs.radius, bs.center.z - bs.radius)); bounds.add(matrix * dvec3(bs.center.x + bs.radius, bs.center.y - bs.radius, bs.center.z - bs.radius)); bounds.add(matrix * dvec3(bs.center.x - bs.radius, bs.center.y + bs.radius, bs.center.z - bs.radius)); diff --git a/src/vsg/utils/ShaderCompiler.cpp b/src/vsg/utils/ShaderCompiler.cpp index ff1364a1bb..9e79e395a4 100644 --- a/src/vsg/utils/ShaderCompiler.cpp +++ b/src/vsg/utils/ShaderCompiler.cpp @@ -281,7 +281,7 @@ bool ShaderCompiler::compile(ShaderStages& shaders, const std::vectormodule->source, options); std::vector combinedDefines(defines); - for (auto& define : settings->defines) combinedDefines.push_back(define); + for (const auto& define : settings->defines) combinedDefines.push_back(define); if (!combinedDefines.empty()) finalShaderSource = combineSourceAndDefines(finalShaderSource, combinedDefines); vsg::debug("ShaderCompiler::compile() combinedDefines = ", combinedDefines); @@ -472,8 +472,6 @@ std::string ShaderCompiler::combineSourceAndDefines(const std::string& source, c const std::string versionmatch = "#version"; const std::string importdefinesmatch = "#pragma import_defines"; - std::vector finaldefines; - for (std::string line; std::getline(iss, line);) { std::string sanitisedline = line; From 5ef01985584047bd03986f1945b5e1d046b08535 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 10 May 2026 10:52:51 +0100 Subject: [PATCH 24/25] cppcheck bug fix!! --- src/vsg/vk/ResourceRequirements.cpp | 2 +- src/vsg/vk/Swapchain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vsg/vk/ResourceRequirements.cpp b/src/vsg/vk/ResourceRequirements.cpp index 9b02299488..6ca2196714 100644 --- a/src/vsg/vk/ResourceRequirements.cpp +++ b/src/vsg/vk/ResourceRequirements.cpp @@ -90,7 +90,7 @@ void ResourceRequirements::apply(const ResourceHints& resourceHints) viewportStateHint = resourceHints.viewportStateHint; dynamicData.add(resourceHints.dynamicData); - containsPagedLOD = containsPagedLOD | resourceHints.containsPagedLOD; + containsPagedLOD = containsPagedLOD || resourceHints.containsPagedLOD; } ////////////////////////////////////////////////////////////////////// diff --git a/src/vsg/vk/Swapchain.cpp b/src/vsg/vk/Swapchain.cpp index 24b1963651..612e604661 100644 --- a/src/vsg/vk/Swapchain.cpp +++ b/src/vsg/vk/Swapchain.cpp @@ -141,7 +141,7 @@ namespace vsg } protected: - virtual ~SwapchainImage() + ~SwapchainImage() override { for (auto& vd : _vulkanData) { From e4674d4dae8124d7145e76f0f67454692e5e77cd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 10 May 2026 11:31:49 +0100 Subject: [PATCH 25/25] cppcheck fixes --- cmake/cppcheck-suppression-list.txt | 7 +++++-- include/vsg/lighting/AmbientLight.h | 3 --- include/vsg/lighting/HardShadows.h | 4 ---- .../vsg/lighting/PercentageCloserSoftShadows.h | 4 ---- src/vsg/lighting/AmbientLight.cpp | 10 ---------- src/vsg/lighting/HardShadows.cpp | 15 --------------- src/vsg/lighting/PercentageCloserSoftShadows.cpp | 15 --------------- src/vsg/meshshaders/DrawMeshTasks.cpp | 2 +- src/vsg/meshshaders/DrawMeshTasksIndirect.cpp | 2 +- .../meshshaders/DrawMeshTasksIndirectCount.cpp | 2 +- src/vsg/nodes/Transform.cpp | 4 ++++ 11 files changed, 12 insertions(+), 56 deletions(-) diff --git a/cmake/cppcheck-suppression-list.txt b/cmake/cppcheck-suppression-list.txt index d25ad2cce2..8d50104252 100644 --- a/cmake/cppcheck-suppression-list.txt +++ b/cmake/cppcheck-suppression-list.txt @@ -224,6 +224,11 @@ cstyleCast:*/src/vsg/io/mem_stream.cpp // suppress unhelpful warnings of override that make inform programmers what is being done uselessOverride:*/include/vsg/utils/TracyInstrumentation.h +uselessOverride:*/include/vsg/ui/WindowEvent.h +uselessOverride:*/include/vsg/utils/ShaderSet.h +uselessOverride:*/include/vsg/nodes/Transform.h +uselessOverride:*/include/vsg/raytracing/DescriptorAccelerationStructure.h +uselessOverride:*/include/vsg/raytracing/RayTracingShaderGroup.h // suppress inappropriate warning constParameterReference:*/include/vsg/vk/Device.h @@ -258,8 +263,6 @@ functionStatic:*/include/vsg/state/ArrayState.h functionStatic:*/include/vsg/text/StandardLayout.h functionStatic:*/include/vsg/utils/Builder.h functionStatic:*/include/vsg/utils/ShaderCompiler.h -functionStatic:*/ -functionStatic:*/ // suppress inappropriate warnings diff --git a/include/vsg/lighting/AmbientLight.h b/include/vsg/lighting/AmbientLight.h index bcb22f8a6f..61d418c2a3 100644 --- a/include/vsg/lighting/AmbientLight.h +++ b/include/vsg/lighting/AmbientLight.h @@ -29,9 +29,6 @@ namespace vsg public: ref_ptr clone(const CopyOp& copyop = {}) const override { return AmbientLight::create(*this, copyop); } - void read(Input& input) override; - void write(Output& output) const override; - protected: ~AmbientLight() override {} }; diff --git a/include/vsg/lighting/HardShadows.h b/include/vsg/lighting/HardShadows.h index 1f868cb4c7..035351aa0c 100644 --- a/include/vsg/lighting/HardShadows.h +++ b/include/vsg/lighting/HardShadows.h @@ -25,10 +25,6 @@ namespace vsg public: ref_ptr clone(const CopyOp& copyop = {}) const override { return HardShadows::create(*this, copyop); } - int compare(const Object& rhs) const override; - - void read(Input& input) override; - void write(Output& output) const override; }; VSG_type_name(vsg::HardShadows); diff --git a/include/vsg/lighting/PercentageCloserSoftShadows.h b/include/vsg/lighting/PercentageCloserSoftShadows.h index 40bd546ebd..8bda61a965 100644 --- a/include/vsg/lighting/PercentageCloserSoftShadows.h +++ b/include/vsg/lighting/PercentageCloserSoftShadows.h @@ -25,10 +25,6 @@ namespace vsg public: ref_ptr clone(const CopyOp& copyop = {}) const override { return PercentageCloserSoftShadows::create(*this, copyop); } - int compare(const Object& rhs) const override; - - void read(Input& input) override; - void write(Output& output) const override; }; VSG_type_name(vsg::PercentageCloserSoftShadows); diff --git a/src/vsg/lighting/AmbientLight.cpp b/src/vsg/lighting/AmbientLight.cpp index 6878dc4490..72f59aaf58 100644 --- a/src/vsg/lighting/AmbientLight.cpp +++ b/src/vsg/lighting/AmbientLight.cpp @@ -22,13 +22,3 @@ AmbientLight::AmbientLight(const AmbientLight& rhs, const CopyOp& copyop) : Inherit(rhs, copyop) { } - -void AmbientLight::read(Input& input) -{ - Light::read(input); -} - -void AmbientLight::write(Output& output) const -{ - Light::write(output); -} diff --git a/src/vsg/lighting/HardShadows.cpp b/src/vsg/lighting/HardShadows.cpp index bdd702c9f6..f9811747dc 100644 --- a/src/vsg/lighting/HardShadows.cpp +++ b/src/vsg/lighting/HardShadows.cpp @@ -23,18 +23,3 @@ HardShadows::HardShadows(const HardShadows& rhs, const CopyOp& copyop) : Inherit(rhs, copyop) { } - -int HardShadows::compare(const Object& rhs_object) const -{ - return ShadowSettings::compare(rhs_object); -} - -void HardShadows::read(Input& input) -{ - ShadowSettings::read(input); -} - -void HardShadows::write(Output& output) const -{ - ShadowSettings::write(output); -} diff --git a/src/vsg/lighting/PercentageCloserSoftShadows.cpp b/src/vsg/lighting/PercentageCloserSoftShadows.cpp index 85de950484..ede15efdcd 100644 --- a/src/vsg/lighting/PercentageCloserSoftShadows.cpp +++ b/src/vsg/lighting/PercentageCloserSoftShadows.cpp @@ -23,18 +23,3 @@ PercentageCloserSoftShadows::PercentageCloserSoftShadows(const PercentageCloserS Inherit(rhs, copyop) { } - -int PercentageCloserSoftShadows::compare(const Object& rhs_object) const -{ - return ShadowSettings::compare(rhs_object); -} - -void PercentageCloserSoftShadows::read(Input& input) -{ - ShadowSettings::read(input); -} - -void PercentageCloserSoftShadows::write(Output& output) const -{ - ShadowSettings::write(output); -} diff --git a/src/vsg/meshshaders/DrawMeshTasks.cpp b/src/vsg/meshshaders/DrawMeshTasks.cpp index da2bca13cc..df6e13430c 100644 --- a/src/vsg/meshshaders/DrawMeshTasks.cpp +++ b/src/vsg/meshshaders/DrawMeshTasks.cpp @@ -43,7 +43,7 @@ void DrawMeshTasks::write(Output& output) const void DrawMeshTasks::record(vsg::CommandBuffer& commandBuffer) const { - Device* device = commandBuffer.getDevice(); + auto device = commandBuffer.getDevice(); auto extensions = device->getExtensions(); extensions->vkCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); } diff --git a/src/vsg/meshshaders/DrawMeshTasksIndirect.cpp b/src/vsg/meshshaders/DrawMeshTasksIndirect.cpp index 3e0a6a60e4..cd0a49a186 100644 --- a/src/vsg/meshshaders/DrawMeshTasksIndirect.cpp +++ b/src/vsg/meshshaders/DrawMeshTasksIndirect.cpp @@ -72,7 +72,7 @@ void DrawMeshTasksIndirect::compile(Context& context) void DrawMeshTasksIndirect::record(vsg::CommandBuffer& commandBuffer) const { - Device* device = commandBuffer.getDevice(); + auto device = commandBuffer.getDevice(); auto extensions = device->getExtensions(); extensions->vkCmdDrawMeshTasksIndirectEXT(commandBuffer, drawParameters->buffer->vk(commandBuffer.deviceID), drawParameters->offset, drawCount, stride); } diff --git a/src/vsg/meshshaders/DrawMeshTasksIndirectCount.cpp b/src/vsg/meshshaders/DrawMeshTasksIndirectCount.cpp index c8e7e53c17..ab7c18462f 100644 --- a/src/vsg/meshshaders/DrawMeshTasksIndirectCount.cpp +++ b/src/vsg/meshshaders/DrawMeshTasksIndirectCount.cpp @@ -83,7 +83,7 @@ void DrawMeshTasksIndirectCount::compile(Context& context) void DrawMeshTasksIndirectCount::record(vsg::CommandBuffer& commandBuffer) const { - Device* device = commandBuffer.getDevice(); + auto device = commandBuffer.getDevice(); auto extensions = device->getExtensions(); extensions->vkCmdDrawMeshTasksIndirectCountEXT(commandBuffer, drawParameters->buffer->vk(commandBuffer.deviceID), drawParameters->offset, drawCount->buffer->vk(commandBuffer.deviceID), drawCount->offset, maxDrawCount, stride); } diff --git a/src/vsg/nodes/Transform.cpp b/src/vsg/nodes/Transform.cpp index 52cc4cb362..ae70dd756d 100644 --- a/src/vsg/nodes/Transform.cpp +++ b/src/vsg/nodes/Transform.cpp @@ -38,9 +38,13 @@ int Transform::compare(const Object& rhs_object) const void Transform::read(Input& input) { Group::read(input); + + // subclasses currently serialize subgraphRequiresLocalFrustum } void Transform::write(Output& output) const { Group::write(output); + + // subclasses currently serialize subgraphRequiresLocalFrustum }