Skip to content

Commit

Permalink
Demo fix: returned point by value instead of reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaybro committed May 31, 2023
1 parent be6ec02 commit f0e28e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/kd_tree/kd_tree_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ struct Traits {
}

// Returns the idx'th point from the input space.
inline static PointType PointAt(SpaceType const& space, IndexType const idx) {
inline static PointType const& PointAt(
SpaceType const& space, IndexType const idx) {
return space[idx];
}

Expand Down

0 comments on commit f0e28e3

Please sign in to comment.