Internals: Fix remaining cppcheck errors (#6319)

Fixed the non const-related issue and added suppressions for the const
ones. With that `make cppcheck` should be clean.
This commit is contained in:
Geza Lore
2025-08-21 09:43:37 +01:00
committed by GitHub
parent bd91b619ad
commit 327d55d13d
64 changed files with 266 additions and 134 deletions
+2
View File
@@ -112,6 +112,7 @@ public:
// the edge user field. We also want easy access to the 'id'
// which uniquely identifies a single bidir edge. Luckily we
// can do both efficiently.
// cppcheck-suppress badBitmaskCheck
const uint64_t userValue = (static_cast<uint64_t>(cost) << 32) | edgeId;
(new V3GraphEdge{this, fp, tp, cost})->user(userValue);
(new V3GraphEdge{this, tp, fp, cost})->user(userValue);
@@ -121,6 +122,7 @@ public:
return static_cast<uint32_t>(edgep->user());
}
// cppcheck-suppress duplInheritedMember
bool empty() const { return m_vertices.empty(); }
const std::list<Vertex*> keysToVertexList(const std::vector<T_Key>& odds) {