Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenMesh
OpenMesh
Commits
d71fc18d
Commit
d71fc18d
authored
May 10, 2016
by
Jan Möbius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cppcheck_fixes' into 'master'
Cppcheck fixes via gitlab See merge request
!60
parents
0837d5d1
4e9e5b26
Pipeline
#1676
passed with stage
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
33 deletions
+74
-33
.gitlab-ci.yml
.gitlab-ci.yml
+5
-0
CI/ci-cppcheck.sh
CI/ci-cppcheck.sh
+50
-0
src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc
...pps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc
+4
-8
src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc
...sh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc
+5
-9
src/OpenMesh/Tools/VDPM/VHierarchy.cc
src/OpenMesh/Tools/VDPM/VHierarchy.cc
+2
-1
src/OpenMesh/Tools/VDPM/VHierarchyNode.hh
src/OpenMesh/Tools/VDPM/VHierarchyNode.hh
+1
-1
src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc
src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc
+4
-14
src/OpenMesh/Tools/VDPM/ViewingParameters.cc
src/OpenMesh/Tools/VDPM/ViewingParameters.cc
+3
-0
No files found.
.gitlab-ci.yml
View file @
d71fc18d
...
...
@@ -27,3 +27,8 @@ macos-c++98:
script
:
"
CI/ci-mac.sh
C++98"
tags
:
-
Apple
cppcheck
:
script
:
"
CI/ci-cppcheck.sh"
tags
:
-
Linux
CI/ci-cppcheck.sh
0 → 100755
View file @
d71fc18d
#!/bin/bash
# Exit script on any error
set
-e
#=====================================
# Color Settings:
#=====================================
NC
=
'\033[0m'
OUTPUT
=
'\033[0;32m'
WARNING
=
'\033[0;93m'
echo
-e
"
${
OUTPUT
}
"
echo
"=============================================================================="
echo
"Running cppcheck"
echo
"=============================================================================="
echo
-e
"
${
NC
}
"
echo
"Please Wait ..."
# Run cppcheck and output into file
cppcheck
--enable
=
all
.
-I
src
-i
Doc/
--force
--suppress
=
unusedFunction
--suppress
=
missingIncludeSystem
--quiet
vi src/OpenMesh/Tools/Utils/Timer.hh
-Umin
-Umax
-UBMPOSTFIX
-DOPENMESHDLLEXPORT
=
""
&> cppcheck.log
echo
-e
"
${
OUTPUT
}
"
echo
"=============================================================================="
echo
"CPPCHECK Messages"
echo
"=============================================================================="
echo
-e
"
${
NC
}
"
# Echo output to command line for simple analysis via gitlab
cat
cppcheck.log
COUNT
=
$(
wc
-l
< cppcheck.log
)
echo
-e
"
${
OUTPUT
}
"
echo
"=============================================================================="
echo
"CPPCHECK Summary"
echo
"=============================================================================="
echo
-e
"
${
NC
}
"
if
[
$COUNT
-gt
0
]
;
then
echo
-e
${
WARNING
}
echo
"Total CPPCHECK error Count is
$COUNT
, which is too High! CPPCHECK Run failed"
;
echo
-e
"
${
NC
}
"
exit
1
;
else
echo
"Total CPPCHECK error Count is
$COUNT
... OK"
fi
src/OpenMesh/Apps/Unsupported/Streaming-qt4/Server/VDPMServerSession.cc
View file @
d71fc18d
...
...
@@ -252,11 +252,7 @@ stream_vsplits()
VHierarchyNodeHandle
node_handle
;
OpenMesh
::
Vec3f
pos
;
VHierarchyNodeIndex
node_index
,
fund_lcut_index
,
fund_rcut_index
;
float
lchild_radius
,
rchild_radius
;
OpenMesh
::
Vec3f
lchild_normal
,
rchild_normal
;
float
lchild_sin_square
,
rchild_sin_square
;
float
lchild_mue_square
,
rchild_mue_square
;
float
lchild_sigma_square
,
rchild_sigma_square
;
unsigned
int
n_vsplit_packets
=
(
unsigned
int
)
vsplits_
.
size
();
QDataStream
qTcp
(
socket_
);
...
...
@@ -277,11 +273,11 @@ stream_vsplits()
node_index
=
node
.
node_index
();
fund_lcut_index
=
node
.
fund_lcut_index
();
fund_rcut_index
=
node
.
fund_rcut_index
();
lchild_radius
=
lchild
.
radius
();
rchild_radius
=
rchild
.
radius
();
const
float
lchild_radius
=
lchild
.
radius
();
const
float
rchild_radius
=
rchild
.
radius
();
lchild_normal
=
lchild
.
normal
();
rchild_normal
=
rchild
.
normal
();
lchild_sin_square
=
lchild
.
sin_square
();
rchild_sin_square
=
rchild
.
sin_square
();
lchild_mue_square
=
lchild
.
mue_square
();
rchild_mue_square
=
rchild
.
mue_square
();
lchild_sigma_square
=
lchild
.
sigma_square
();
rchild_sigma_square
=
rchild
.
sigma_square
();
const
float
lchild_sin_square
=
lchild
.
sin_square
();
const
float
rchild_sin_square
=
rchild
.
sin_square
();
const
float
lchild_mue_square
=
lchild
.
mue_square
();
const
float
rchild_mue_square
=
rchild
.
mue_square
();
const
float
lchild_sigma_square
=
lchild
.
sigma_square
();
const
float
rchild_sigma_square
=
rchild
.
sigma_square
();
qTcp
<<
pos
[
0
]
<<
pos
[
1
]
<<
pos
[
2
]
<<
node_index
.
value
()
...
...
src/OpenMesh/Apps/Unsupported/Streaming/Server/VDPMServerSession.cc
View file @
d71fc18d
...
...
@@ -245,11 +245,7 @@ stream_vsplits()
VHierarchyNodeHandle
node_handle
;
OpenMesh
::
Vec3f
pos
;
VHierarchyNodeIndex
node_index
,
fund_lcut_index
,
fund_rcut_index
;
float
lchild_radius
,
rchild_radius
;
OpenMesh
::
Vec3f
lchild_normal
,
rchild_normal
;
float
lchild_sin_square
,
rchild_sin_square
;
float
lchild_mue_square
,
rchild_mue_square
;
float
lchild_sigma_square
,
rchild_sigma_square
;
unsigned
int
n_vsplit_packets
=
(
unsigned
int
)
vsplits_
.
size
();
QDataStream
qTcp
(
this
);
...
...
@@ -270,11 +266,11 @@ stream_vsplits()
node_index
=
node
.
node_index
();
fund_lcut_index
=
node
.
fund_lcut_index
();
fund_rcut_index
=
node
.
fund_rcut_index
();
lchild_radius
=
lchild
.
radius
();
rchild_radius
=
rchild
.
radius
();
lchild_normal
=
lchild
.
normal
();
rchild_normal
=
rchild
.
normal
();
lchild_sin_square
=
lchild
.
sin_square
();
rchild_sin_square
=
rchild
.
sin_square
();
lchild_mue_square
=
lchild
.
mue_square
();
rchild_mue_square
=
rchild
.
mue_square
();
lchild_sigma_square
=
lchild
.
sigma_square
();
rchild_sigma_square
=
rchild
.
sigma_square
();
const
float
lchild_radius
=
lchild
.
radius
();
const
float
rchild_radius
=
rchild
.
radius
();
lchild_normal
=
lchild
.
normal
();
rchild_normal
=
rchild
.
normal
();
const
float
lchild_sin_square
=
lchild
.
sin_square
();
const
float
rchild_sin_square
=
rchild
.
sin_square
();
const
float
lchild_mue_square
=
lchild
.
mue_square
();
const
float
rchild_mue_square
=
rchild
.
mue_square
();
const
float
lchild_sigma_square
=
lchild
.
sigma_square
();
const
float
rchild_sigma_square
=
rchild
.
sigma_square
();
qTcp
<<
pos
[
0
]
<<
pos
[
1
]
<<
pos
[
2
]
<<
node_index
.
value
()
...
...
src/OpenMesh/Tools/VDPM/VHierarchy.cc
View file @
d71fc18d
...
...
@@ -67,7 +67,8 @@ namespace VDPM {
VHierarchy
::
VHierarchy
()
VHierarchy
()
:
n_roots_
(
0
),
tree_id_bits_
(
0
)
{
clear
();
}
...
...
src/OpenMesh/Tools/VDPM/VHierarchyNode.hh
View file @
d71fc18d
...
...
@@ -96,7 +96,7 @@ class VHierarchyNode
{
public:
VHierarchyNode
()
{
}
VHierarchyNode
()
:
radius_
(
0.0
f
),
sin_square_
(
0.0
f
),
mue_square_
(
0.0
f
),
sigma_square_
(
0.0
f
)
{
}
/// Returns true, if node is root else false.
bool
is_root
()
const
...
...
src/OpenMesh/Tools/VDPM/VHierarchyWindow.cc
View file @
d71fc18d
...
...
@@ -77,27 +77,17 @@ namespace VDPM {
VHierarchyWindow
::
VHierarchyWindow
()
VHierarchyWindow
()
:
vhierarchy_
(
NULL
),
buffer_
(
NULL
),
buffer_min_
(
0
),
buffer_max_
(
0
),
window_min_
(
0
),
window_max_
(
0
),
current_pos_
(
0
)
,
n_shift_
(
0
)
{
vhierarchy_
=
NULL
;
buffer_
=
NULL
;
buffer_min_
=
0
;
buffer_max_
=
0
;
window_min_
=
0
;
window_max_
=
0
;
current_pos_
=
0
;
n_shift_
=
0
;
}
VHierarchyWindow
::
VHierarchyWindow
(
VHierarchy
&
_vhierarchy
)
VHierarchyWindow
(
VHierarchy
&
_vhierarchy
)
:
vhierarchy_
(
&
_vhierarchy
),
buffer_
(
NULL
),
buffer_min_
(
0
),
buffer_max_
(
0
),
window_min_
(
0
),
window_max_
(
0
)
,
current_pos_
(
0
)
,
n_shift_
(
0
)
{
vhierarchy_
=
&
_vhierarchy
;
buffer_
=
NULL
;
}
...
...
src/OpenMesh/Tools/VDPM/ViewingParameters.cc
View file @
d71fc18d
...
...
@@ -70,6 +70,9 @@ namespace VDPM {
ViewingParameters
::
ViewingParameters
()
{
for
(
unsigned
int
i
=
0
;
i
<
16
;
++
i
)
modelview_matrix_
[
i
]
=
0.0
;
fovy_
=
45.0
f
;
aspect_
=
1.0
f
;
tolerance_square_
=
0.001
f
;
...
...
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