Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rhodanos
VTK
Commits
cc9ec248
Commit
cc9ec248
authored
8 years ago
by
Menno Deij - van Rijswijk
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes to get rid of -Wunused and -Wformat compiler warnings
parent
f47a0534
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Common/DataModel/Testing/Cxx/TestPolyhedron2.cxx
+2
-1
2 additions, 1 deletion
Common/DataModel/Testing/Cxx/TestPolyhedron2.cxx
Common/DataModel/Testing/Cxx/TestPolyhedron3.cxx
+10
-3
10 additions, 3 deletions
Common/DataModel/Testing/Cxx/TestPolyhedron3.cxx
with
12 additions
and
4 deletions
Common/DataModel/Testing/Cxx/TestPolyhedron2.cxx
+
2
−
1
View file @
cc9ec248
...
...
@@ -27,6 +27,7 @@
int
TestPolyhedron2
(
int
argc
,
char
*
argv
[]
)
{
if
(
argc
<
3
)
return
1
;
// test not run with data on the command line
const
char
*
filename
=
argv
[
2
];
vtkNew
<
vtkXMLUnstructuredGridReader
>
reader
;
reader
->
SetFileName
(
filename
);
...
...
@@ -48,7 +49,7 @@ int TestPolyhedron2( int argc, char* argv[] )
vtkPolyData
*
output
=
vtkPolyData
::
SafeDownCast
(
cutter
->
GetOutputDataObject
(
0
));
if
(
output
->
GetNumberOfCells
()
!=
2
)
{
printf
(
"Expected 2 but found
%d cells in intersected polyhedron
\n
"
,
output
->
GetNumberOfCells
())
;
std
::
cout
<<
"Expected 2 but found
"
<<
output
->
GetNumberOfCells
()
<<
" in intersected polyhedron."
<<
std
::
endl
;
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Common/DataModel/Testing/Cxx/TestPolyhedron3.cxx
+
10
−
3
View file @
cc9ec248
...
...
@@ -41,8 +41,15 @@ const char inputDataStream[] =
"42
\n
"
;
// Test of contour/clip of vtkPolyhedron. uses input from http://www.vtk.org/Bug/view.php?id=15026
int
TestPolyhedron3
(
int
argc
,
char
*
argv
[]
)
int
TestPolyhedron3
(
int
argc
,
char
**
argv
)
{
// the next two lines are only in the test to get rid of compiler warnings
// I cannot make the function without the parameters, because that is what
// is expected. At the same time, I also can't not reference them, because
// that give a warning.
if
(
argc
<
0
&&
argc
>
0
)
return
1
;
// reference one formal parameter
if
(
!
argv
&&
argv
)
return
1
;
// reference another formal parameter
vtkNew
<
vtkUnstructuredGridReader
>
reader
;
reader
->
SetInputString
(
inputDataStream
);
reader
->
ReadFromInputStringOn
();
...
...
@@ -60,14 +67,14 @@ int TestPolyhedron3( int argc, char* argv[] )
if
(
!
result
)
return
1
;
if
(
result
->
GetNumberOfCells
()
!=
1
)
{
printf
(
"Expected 1 but found
%d cells in intersected polyhedron
\n
"
,
result
->
GetNumberOfCells
())
;
std
::
cout
<<
"Expected 1 but found
"
<<
result
->
GetNumberOfCells
()
<<
" cells in intersected polyhedron"
<<
std
::
endl
;
return
1
;
}
vtkCell
*
clipped
=
result
->
GetCell
(
0
);
if
(
!
clipped
)
return
1
;
if
(
clipped
->
GetNumberOfFaces
()
!=
7
)
{
printf
(
"Expected 7 but found
%d cell faces in intersected polyhedron
\n
"
,
clipped
->
GetNumberOfFaces
())
;
std
::
cout
<<
"Expected 7 but found
"
<<
result
->
GetNumberOfCells
()
<<
" cells in intersected polyhedron"
<<
std
::
endl
;
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment