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
bee69486
Commit
bee69486
authored
Oct 25, 2016
by
Martin Heistermann
Browse files
Avoid compiler warning in range-for unit tests
parent
75322fef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Unittests/unittests_iterators.cc
View file @
bee69486
...
@@ -26,8 +26,9 @@ TEST_F(HexahedralMeshBase, HexVertexIterTest) {
...
@@ -26,8 +26,9 @@ TEST_F(HexahedralMeshBase, HexVertexIterTest) {
TEST_F
(
HexahedralMeshBase
,
RangeForTest
)
{
TEST_F
(
HexahedralMeshBase
,
RangeForTest
)
{
// no EXPECTs here, if it compiles, it'll work.
// no EXPECTs here, if it compiles, it'll work.
generateHexahedralMesh
(
mesh_
);
generateHexahedralMesh
(
mesh_
);
for
(
const
auto
&
vh
:
mesh_
.
vertices
())
{}
VertexHandle
_dummy
;
// use vh to avoid compiler warnings
for
(
const
auto
&
vh
:
mesh_
.
vertices
())
{
_dummy
=
vh
;}
const
auto
&
constref
=
mesh_
;
const
auto
&
constref
=
mesh_
;
for
(
const
auto
&
vh
:
constref
.
vertices
())
{}
for
(
const
auto
&
vh
:
constref
.
vertices
())
{
_dummy
=
vh
;
}
}
}
#endif
#endif
Write
Preview
Supports
Markdown
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