From 594782d704b95f57f1833dc2dbfec4bde18abc26 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 13 Jun 2015 05:44:34 +0000 Subject: [PATCH] Core: FindBinaryIter fixed git-svn-id: svn://ultimatepp.org/upp/trunk@8534 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Algo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Algo.h b/uppsrc/Core/Algo.h index 6520e314c..ad342c221 100644 --- a/uppsrc/Core/Algo.h +++ b/uppsrc/Core/Algo.h @@ -338,7 +338,7 @@ int FindBinary(const C& v, const T& val, int pos, int count, const L& less) template I FindBinaryIter(I begin, I end, const T& val, const L& less) { - int q = FindUpperBound(begin, begin, end, val, less); + int q = FindBinary(begin, val, 0, end - begin, less); return q < 0 ? NULL : begin + q; }