Skip to content

Commit

Permalink
cppcheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Oct 16, 2024
1 parent d1c6f19 commit c7c632d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions cmake/cppcheck-suppression-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ constParameterReference:*/src/vsg/app/RecordAndSubmitTask.cpp

// suppress inappropriate warning
constVariableReference:*/src/vsg/app/RecordTraversal.cpp
constVariableReference:*/src/vsg/utils/ShaderSet.cpp

// suppress inappropriate warning
constVariablePointer:*/src/vsg/app/SecondaryCommandGraph.cpp

// suppress inappropriate warning
passedByValue:*/src/vsg/vk/Device.cpp
passedByValue:*/src/vsg/vk/Instance.cpp
6 changes: 3 additions & 3 deletions src/vsg/text/StandardLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,23 +288,23 @@ void StandardLayout::layout(const Data* text, const Font& font, TextQuads& quads
void apply(const ubyteArray& text) override
{
reserve(text.size());
for (auto& c : text)
for (const auto& c : text)
{
character(c);
}
}
void apply(const ushortArray& text) override
{
reserve(text.size());
for (auto& c : text)
for (const auto& c : text)
{
character(c);
}
}
void apply(const uintArray& text) override
{
reserve(text.size());
for (auto& c : text)
for (const auto& c : text)
{
character(c);
}
Expand Down
2 changes: 1 addition & 1 deletion src/vsg/vk/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Device::Device(PhysicalDevice* physicalDevice, const QueueSettings& queueSetting

// check to see if the queueFamilyIndex has already been referenced or is unique
bool unique = true;
for (auto& existingInfo : queueCreateInfos)
for (const auto& existingInfo : queueCreateInfos)
{
if (existingInfo.queueFamilyIndex == static_cast<uint32_t>(queueSetting.queueFamilyIndex)) unique = false;
}
Expand Down

0 comments on commit c7c632d

Please sign in to comment.