Feature/core updates etc - #287
Conversation
# Conflicts: # misc/graphviz/src/graphvizsettings.cpp # misc/vtk/src/processors/volumetovtk.cpp # tensorvis/tensorvisbase/include/inviwo/tensorvisbase/datastructures/invariantspace.h
Cpp-Linter Report
|
There was a problem hiding this comment.
Cpp-linter Review
Used clang-tidy v19.1.7
Click here for the full clang-tidy patch
diff --git a/misc/vtk/src/ports/vtkinport.cpp b/misc/vtk/src/ports/vtkinport.cpp
index 1b85019..e9c4006 100644
--- a/misc/vtk/src/ports/vtkinport.cpp
+++ b/misc/vtk/src/ports/vtkinport.cpp
@@ -190 +190 @@ void VtkInport::setTypeId(int typeId) {
- std::vector<VtkOutport*> portsToRemove =
+ const std::vector<VtkOutport*> portsToRemove =
Have any feedback or feature suggestions? Share it here.
| net->forEachProcessor([&](Processor* p) { | ||
| const std::string identifier{p->getIdentifier()}; | ||
| if (auto* n = agnode(G, const_cast<char*>(identifier.c_str()), 0)) { | ||
| if (auto* n = agnode(G, const_cast<char*>(SafeCStr{p->getIdentifier()}.c_str()), 0)) { |
There was a problem hiding this comment.
clang-tidy diagnostic
misc/graphviz/src/graphvizsettings.cpp:162:37: warning: [cppcoreguidelines-pro-type-const-cast]
do not use const_cast to remove const qualifier
162 | if (auto* n = agnode(G, const_cast<char*>(SafeCStr{p->getIdentifier()}.c_str()), 0)) {
| ^| net->forEachProcessor([&](Processor* p) { | ||
| const std::string identifier{p->getIdentifier()}; | ||
| if (auto* n = agnode(G, const_cast<char*>(identifier.c_str()), 0)) { | ||
| if (auto* n = agnode(G, const_cast<char*>(SafeCStr{p->getIdentifier()}.c_str()), 0)) { |
There was a problem hiding this comment.
clang-tidy diagnostic
misc/graphviz/src/graphvizsettings.cpp:177:33: warning: [cppcoreguidelines-pro-type-const-cast]
do not use const_cast to remove const qualifier
177 | if (auto* n = agnode(G, const_cast<char*>(SafeCStr{p->getIdentifier()}.c_str()), 0)) {
| ^| typeId_ = typeId; | ||
| std::vector<Outport*> portsToRemove = | ||
| util::copy_if(connectedOutports_, [&](auto port) { return !canConnectTo(port); }); | ||
| std::vector<VtkOutport*> portsToRemove = |
There was a problem hiding this comment.
clang-tidy diagnostics
- variable 'portsToRemove' of type 'std::vector<VtkOutport *>' can be declared 'const' [misc-const-correctness]
| std::vector<VtkOutport*> portsToRemove = | |
| const std::vector<VtkOutport*> portsToRemove = |
No description provided.