summaryrefslogtreecommitdiff
path: root/binsearch_closest/binsearch_closest.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'binsearch_closest/binsearch_closest.hpp')
-rw-r--r--binsearch_closest/binsearch_closest.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/binsearch_closest/binsearch_closest.hpp b/binsearch_closest/binsearch_closest.hpp
index e95876a..3db703f 100644
--- a/binsearch_closest/binsearch_closest.hpp
+++ b/binsearch_closest/binsearch_closest.hpp
@@ -45,7 +45,7 @@ ssize_t binsearch_closest(const std::vector<T> vec, T val)
return vec.size() - 1;
size_t imin = 0;
- size_t imax = vec.size() - 1;
+ size_t imax = vec.size() - 1;
while (imax - imin > 1) {
// determine midpoint, prevent integer overflow
size_t imid = imin + ((imax - imin) / 2);