diff --git a/CI/ci-cppcheck.sh b/CI/ci-cppcheck.sh index 96176a75342880341eda93a27082b1041129a659..9337e331bb89f6d70cd6e8a4649f15df90dc04c4 100755 --- a/CI/ci-cppcheck.sh +++ b/CI/ci-cppcheck.sh @@ -20,7 +20,7 @@ echo -e "${NC}" echo "Please Wait ..." # Run cppcheck and output into file -cppcheck --enable=all . -I src -i Doc/ --force --suppress=missingIncludeSystem --quiet -Umin -Umax -UBMPOSTFIX -DOPENVOLUMEMESHDLLEXPORT="" 2>&1 | tee cppcheck.log +cppcheck --enable=all . -I src -i Doc/ --force --suppress=missingIncludeSystem --inline-suppr --quiet -Umin -Umax -UBMPOSTFIX -DOPENVOLUMEMESHDLLEXPORT="" 2>&1 | tee cppcheck.log COUNT=$(wc -l < cppcheck.log ) diff --git a/src/OpenVolumeMesh/Geometry/Vector11T.hh b/src/OpenVolumeMesh/Geometry/Vector11T.hh index 7de3d22795040972da3690f21acfdf05f0d19dcf..ccad37a6c20d7afd58ecbfde6da51361d95770ba 100644 --- a/src/OpenVolumeMesh/Geometry/Vector11T.hh +++ b/src/OpenVolumeMesh/Geometry/Vector11T.hh @@ -121,7 +121,9 @@ class VectorT { typename = typename std::enable_if::type, typename = typename std::enable_if< are_convertible_to::value>::type> - constexpr VectorT(T... vs) : values_ { {static_cast(vs)...} } { + // cppcheck-suppress noExplicitConstructor ; only applies to unimportant DIM==1 + constexpr VectorT(T... vs) : values_ { {static_cast(vs)...} } + { static_assert(sizeof...(T) == DIM, "Invalid number of components specified in constructor."); static_assert(are_convertible_to::value, @@ -176,7 +178,9 @@ class VectorT { template::value>> - vector_type& operator=(const VectorT& _rhs) { + // cppcheck-suppress operatorEqRetRefThis ; false positive + vector_type& operator=(const VectorT& _rhs) + { std::transform(_rhs.data(), _rhs.data() + DIM, data(), [](OtherScalar rhs) { return static_cast(std::move(rhs));