Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
f604e8f2
Commit
f604e8f2
authored
May 24, 2019
by
Martin Heistermann
Browse files
silence vector11T cppcheck false positives
parent
d0a6a93b
Changes
2
Hide whitespace changes
Inline
Side-by-side
CI/ci-cppcheck.sh
View file @
f604e8f2
...
...
@@ -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
)
...
...
src/OpenVolumeMesh/Geometry/Vector11T.hh
View file @
f604e8f2
...
...
@@ -121,7 +121,9 @@ class VectorT {
typename
=
typename
std
::
enable_if
<
sizeof
...(
T
)
==
DIM
>
::
type
,
typename
=
typename
std
::
enable_if
<
are_convertible_to
<
Scalar
,
T
...
>::
value
>::
type
>
constexpr
VectorT
(
T
...
vs
)
:
values_
{
{
static_cast
<
Scalar
>
(
vs
)...}
}
{
// cppcheck-suppress noExplicitConstructor ; only applies to unimportant DIM==1
constexpr
VectorT
(
T
...
vs
)
:
values_
{
{
static_cast
<
Scalar
>
(
vs
)...}
}
{
static_assert
(
sizeof
...(
T
)
==
DIM
,
"Invalid number of components specified in constructor."
);
static_assert
(
are_convertible_to
<
Scalar
,
T
...
>::
value
,
...
...
@@ -176,7 +178,9 @@ class VectorT {
template
<
typename
OtherScalar
,
typename
=
typename
std
::
enable_if
<
std
::
is_convertible
<
OtherScalar
,
Scalar
>
::
value
>>
vector_type
&
operator
=
(
const
VectorT
<
OtherScalar
,
DIM
>&
_rhs
)
{
// cppcheck-suppress operatorEqRetRefThis ; false positive
vector_type
&
operator
=
(
const
VectorT
<
OtherScalar
,
DIM
>&
_rhs
)
{
std
::
transform
(
_rhs
.
data
(),
_rhs
.
data
()
+
DIM
,
data
(),
[](
OtherScalar
rhs
)
{
return
static_cast
<
Scalar
>
(
std
::
move
(
rhs
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment