Skip to content

Commit e4674d4

Browse files
committed
cppcheck fixes
1 parent 5ef0198 commit e4674d4

11 files changed

Lines changed: 12 additions & 56 deletions

cmake/cppcheck-suppression-list.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ cstyleCast:*/src/vsg/io/mem_stream.cpp
224224

225225
// suppress unhelpful warnings of override that make inform programmers what is being done
226226
uselessOverride:*/include/vsg/utils/TracyInstrumentation.h
227+
uselessOverride:*/include/vsg/ui/WindowEvent.h
228+
uselessOverride:*/include/vsg/utils/ShaderSet.h
229+
uselessOverride:*/include/vsg/nodes/Transform.h
230+
uselessOverride:*/include/vsg/raytracing/DescriptorAccelerationStructure.h
231+
uselessOverride:*/include/vsg/raytracing/RayTracingShaderGroup.h
227232

228233
// suppress inappropriate warning
229234
constParameterReference:*/include/vsg/vk/Device.h
@@ -258,8 +263,6 @@ functionStatic:*/include/vsg/state/ArrayState.h
258263
functionStatic:*/include/vsg/text/StandardLayout.h
259264
functionStatic:*/include/vsg/utils/Builder.h
260265
functionStatic:*/include/vsg/utils/ShaderCompiler.h
261-
functionStatic:*/
262-
functionStatic:*/
263266

264267

265268
// suppress inappropriate warnings

include/vsg/lighting/AmbientLight.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ namespace vsg
2929
public:
3030
ref_ptr<Object> clone(const CopyOp& copyop = {}) const override { return AmbientLight::create(*this, copyop); }
3131

32-
void read(Input& input) override;
33-
void write(Output& output) const override;
34-
3532
protected:
3633
~AmbientLight() override {}
3734
};

include/vsg/lighting/HardShadows.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ namespace vsg
2525

2626
public:
2727
ref_ptr<Object> clone(const CopyOp& copyop = {}) const override { return HardShadows::create(*this, copyop); }
28-
int compare(const Object& rhs) const override;
29-
30-
void read(Input& input) override;
31-
void write(Output& output) const override;
3228
};
3329
VSG_type_name(vsg::HardShadows);
3430

include/vsg/lighting/PercentageCloserSoftShadows.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ namespace vsg
2525

2626
public:
2727
ref_ptr<Object> clone(const CopyOp& copyop = {}) const override { return PercentageCloserSoftShadows::create(*this, copyop); }
28-
int compare(const Object& rhs) const override;
29-
30-
void read(Input& input) override;
31-
void write(Output& output) const override;
3228
};
3329
VSG_type_name(vsg::PercentageCloserSoftShadows);
3430

src/vsg/lighting/AmbientLight.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ AmbientLight::AmbientLight(const AmbientLight& rhs, const CopyOp& copyop) :
2222
Inherit(rhs, copyop)
2323
{
2424
}
25-
26-
void AmbientLight::read(Input& input)
27-
{
28-
Light::read(input);
29-
}
30-
31-
void AmbientLight::write(Output& output) const
32-
{
33-
Light::write(output);
34-
}

src/vsg/lighting/HardShadows.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,3 @@ HardShadows::HardShadows(const HardShadows& rhs, const CopyOp& copyop) :
2323
Inherit(rhs, copyop)
2424
{
2525
}
26-
27-
int HardShadows::compare(const Object& rhs_object) const
28-
{
29-
return ShadowSettings::compare(rhs_object);
30-
}
31-
32-
void HardShadows::read(Input& input)
33-
{
34-
ShadowSettings::read(input);
35-
}
36-
37-
void HardShadows::write(Output& output) const
38-
{
39-
ShadowSettings::write(output);
40-
}

src/vsg/lighting/PercentageCloserSoftShadows.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,3 @@ PercentageCloserSoftShadows::PercentageCloserSoftShadows(const PercentageCloserS
2323
Inherit(rhs, copyop)
2424
{
2525
}
26-
27-
int PercentageCloserSoftShadows::compare(const Object& rhs_object) const
28-
{
29-
return ShadowSettings::compare(rhs_object);
30-
}
31-
32-
void PercentageCloserSoftShadows::read(Input& input)
33-
{
34-
ShadowSettings::read(input);
35-
}
36-
37-
void PercentageCloserSoftShadows::write(Output& output) const
38-
{
39-
ShadowSettings::write(output);
40-
}

src/vsg/meshshaders/DrawMeshTasks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void DrawMeshTasks::write(Output& output) const
4343

4444
void DrawMeshTasks::record(vsg::CommandBuffer& commandBuffer) const
4545
{
46-
Device* device = commandBuffer.getDevice();
46+
auto device = commandBuffer.getDevice();
4747
auto extensions = device->getExtensions();
4848
extensions->vkCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ);
4949
}

src/vsg/meshshaders/DrawMeshTasksIndirect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void DrawMeshTasksIndirect::compile(Context& context)
7272

7373
void DrawMeshTasksIndirect::record(vsg::CommandBuffer& commandBuffer) const
7474
{
75-
Device* device = commandBuffer.getDevice();
75+
auto device = commandBuffer.getDevice();
7676
auto extensions = device->getExtensions();
7777
extensions->vkCmdDrawMeshTasksIndirectEXT(commandBuffer, drawParameters->buffer->vk(commandBuffer.deviceID), drawParameters->offset, drawCount, stride);
7878
}

src/vsg/meshshaders/DrawMeshTasksIndirectCount.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void DrawMeshTasksIndirectCount::compile(Context& context)
8383

8484
void DrawMeshTasksIndirectCount::record(vsg::CommandBuffer& commandBuffer) const
8585
{
86-
Device* device = commandBuffer.getDevice();
86+
auto device = commandBuffer.getDevice();
8787
auto extensions = device->getExtensions();
8888
extensions->vkCmdDrawMeshTasksIndirectCountEXT(commandBuffer, drawParameters->buffer->vk(commandBuffer.deviceID), drawParameters->offset, drawCount->buffer->vk(commandBuffer.deviceID), drawCount->offset, maxDrawCount, stride);
8989
}

0 commit comments

Comments
 (0)