From fead71da5456b2756befe81d4b528b1c1f5dd3e1 Mon Sep 17 00:00:00 2001 From: karenzshea Date: Fri, 21 Oct 2016 14:22:12 -0700 Subject: [PATCH] add comment on find() [skip ci] --- src/contractor/contractor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/contractor/contractor.cpp b/src/contractor/contractor.cpp index 04ca61b45..c4ea3641a 100644 --- a/src/contractor/contractor.cpp +++ b/src/contractor/contractor.cpp @@ -263,7 +263,9 @@ struct TurnPenaltySource final using TurnPenaltySourceFlatMap = std::vector; using SegmentSpeedSourceFlatMap = std::vector; -// Binary Search over a flattened key,val Segment storage +// Find is a binary Search over a flattened key,val Segment storage +// It takes the flat map and a Segment/PenaltySource object that has an overloaded +// `==` operator, to make the std::lower_bound call work generically template auto find(const FlatMap &map, const SegmentKey &key) {