Skip to content

Commit 6b2d470

Browse files
N-Dekkerhjmjohnson
authored andcommitted
COMP: Fix [[nodiscard]] warnings in PolyLineParametricPath1 example
Fixed Mac/Darwin Clang warnings saying: > warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result] From https://open.cdash.org/viewBuildError.php?type=1&buildid=8600267
1 parent 63d4354 commit 6b2d470

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ main(int argc, char * argv[])
102102
point[0] = origin[0] + spacing[0] * size[0];
103103
point[1] = origin[1] + spacing[1] * size[1];
104104

105-
image->TransformPhysicalPointToContinuousIndex(origin, cindex);
105+
using ContinuousIndexValueType = ContinuousIndexType::ValueType;
106+
107+
cindex =
108+
image->TransformPhysicalPointToContinuousIndex<ContinuousIndexValueType>(
109+
origin);
106110
path->AddVertex(cindex);
107-
image->TransformPhysicalPointToContinuousIndex(point, cindex);
111+
cindex =
112+
image->TransformPhysicalPointToContinuousIndex<ContinuousIndexValueType>(
113+
point);
108114
path->AddVertex(cindex);
109115
// Software Guide : EndCodeSnippet
110116

0 commit comments

Comments
 (0)