Skip to content

Commit 9438840

Browse files
committed
cppcheck fixes
1 parent 3cb19df commit 9438840

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

include/vsg/commands/Event.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace vsg
5757
void record(CommandBuffer& commandBuffer) const override;
5858

5959
protected:
60-
virtual ~SetEvent();
60+
~SetEvent() override;
6161
};
6262
VSG_type_name(vsg::SetEvent);
6363

@@ -73,7 +73,7 @@ namespace vsg
7373
void record(CommandBuffer& commandBuffer) const override;
7474

7575
protected:
76-
virtual ~ResetEvent();
76+
~ResetEvent() override;
7777
};
7878
VSG_type_name(vsg::ResetEvent);
7979

@@ -107,7 +107,7 @@ namespace vsg
107107
ImageMemoryBarriers imageMemoryBarriers;
108108

109109
protected:
110-
virtual ~WaitEvents();
110+
~WaitEvents() override;
111111
};
112112
VSG_type_name(vsg::WaitEvents);
113113

include/vsg/core/External.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace vsg
5959
void add(const Path& filename, ref_ptr<Object> object = {}) { entries[filename] = object; }
6060

6161
protected:
62-
virtual ~External();
62+
~External() override;
6363
};
6464
VSG_type_name(vsg::External);
6565

include/vsg/core/IntrusiveAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace vsg
4848
explicit IntrusiveAllocator(size_t in_defaultAlignment = 8);
4949
explicit IntrusiveAllocator(std::unique_ptr<Allocator> in_nestedAllocator, size_t in_defaultAlignment = 8);
5050

51-
~IntrusiveAllocator();
51+
~IntrusiveAllocator() override;
5252

5353
void report(std::ostream& out) const override;
5454

include/vsg/core/MipmapLayout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace vsg
4747
void write(Output& output) const override;
4848

4949
protected:
50-
virtual ~MipmapLayout();
50+
~MipmapLayout() override;
5151
};
5252
VSG_type_name(vsg::MipmapLayout);
5353

include/vsg/core/Objects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace vsg
4848
}
4949

5050
protected:
51-
virtual ~Objects();
51+
~Objects() override;
5252
};
5353
VSG_type_name(vsg::Objects);
5454

include/vsg/state/QueryPool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace vsg
5151
void compile(Context& context);
5252

5353
protected:
54-
~QueryPool();
54+
~QueryPool() override;
5555

5656
VkQueryPool _queryPool{};
5757
ref_ptr<Device> _device{};

src/vsg/utils/PolytopeIntersector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ PolytopeIntersector::PolytopeIntersector(const Camera& camera, double xMin, doub
220220
clipspace.push_back(dplane(0.0, 0.0, 1.0, ndc_far)); // far
221221

222222
vsg::Polytope eyespace;
223-
for (auto& pl : clipspace)
223+
for (const auto& pl : clipspace)
224224
{
225225
eyespace.push_back(pl * projectionMatrix);
226226
}
227227

228228
_polytopeStack.push_back(eyespace);
229229

230230
vsg::Polytope worldspace;
231-
for (auto& pl : eyespace)
231+
for (const auto& pl : eyespace)
232232
{
233233
worldspace.push_back(pl * viewMatrix);
234234
}
@@ -276,7 +276,7 @@ void PolytopeIntersector::pushTransform(const Transform& transform)
276276
const auto& worldspace = _polytopeStack.front();
277277

278278
Polytope localspace;
279-
for (auto& pl : worldspace)
279+
for (const auto& pl : worldspace)
280280
{
281281
localspace.push_back(pl * localToWorld);
282282
}

0 commit comments

Comments
 (0)