Changes have been pushed for the repository "fawkesrobotics/fawkes".
Clone: https://github.com/fawkesrobotics/fawkes.git Gitweb: https://github.com/fawkesrobotics/fawkes The branch, thofmann/line-segmentation-const-ref has been created at 1c628222733f5ae4c488a2019d23f29e58b1b17c (commit) https://github.com/fawkesrobotics/fawkes/tree/thofmann/line-segmentation-const-ref - *Log* --------------------------------------------------------------- commit 1c628222733f5ae4c488a2019d23f29e58b1b17c Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Mon Nov 11 17:29:24 2019 +0100 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Mon Nov 11 17:29:24 2019 +0100 utils: pass by const ref instead of by value in line segmentation There is no need to pass the line ends by value, pass them by const reference instead. https://github.com/fawkesrobotics/fawkes/commit/1c6282227 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- - *Diffs* ------------------------------------------------------------- - *commit* 1c628222733f5ae4c488a2019d23f29e58b1b17c - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Mon Nov 11 17:29:24 2019 +0100 Subject: utils: pass by const ref instead of by value in line segmentation src/libs/utils/math/lines.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) _Diff for modified files_: diff --git a/src/libs/utils/math/lines.h b/src/libs/utils/math/lines.h index 9b4078433..d445586cf 100644 --- a/src/libs/utils/math/lines.h +++ b/src/libs/utils/math/lines.h @@ -37,10 +37,10 @@ namespace fawkes { * @return true if the lines intersect, false otherwise */ bool -line_segm_intersect(const Eigen::Vector2f l1_from, - const Eigen::Vector2f l1_to, - const Eigen::Vector2f l2_from, - const Eigen::Vector2f l2_to) +line_segm_intersect(const Eigen::Vector2f &l1_from, + const Eigen::Vector2f &l1_to, + const Eigen::Vector2f &l2_from, + const Eigen::Vector2f &l2_to) { const Eigen::ParametrizedLine<float, 2> edge_seg( Eigen::ParametrizedLine<float, 2>::Through(l1_from, l1_to)); @@ -114,10 +114,10 @@ line_segm_intersect(const Eigen::Vector2f l1_from, * no intersection point exists. */ Eigen::Vector2f -line_segm_intersection(const Eigen::Vector2f l1_from, - const Eigen::Vector2f l1_to, - const Eigen::Vector2f l2_from, - const Eigen::Vector2f l2_to) +line_segm_intersection(const Eigen::Vector2f &l1_from, + const Eigen::Vector2f &l1_to, + const Eigen::Vector2f &l2_from, + const Eigen::Vector2f &l2_to) { const Eigen::ParametrizedLine<float, 2> edge_seg( Eigen::ParametrizedLine<float, 2>::Through(l1_from, l1_to)); _______________________________________________ fawkes-commits mailing list fawkes-commits@lists.kbsg.rwth-aachen.de https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits