Skip to content

Commit f0e28e3

Browse files
committed
Demo fix: returned point by value instead of reference.
1 parent be6ec02 commit f0e28e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/kd_tree/kd_tree_traits.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ struct Traits {
2727
}
2828

2929
// Returns the idx'th point from the input space.
30-
inline static PointType PointAt(SpaceType const& space, IndexType const idx) {
30+
inline static PointType const& PointAt(
31+
SpaceType const& space, IndexType const idx) {
3132
return space[idx];
3233
}
3334

0 commit comments

Comments
 (0)