diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-20 16:22:12 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-23 21:20:47 +0200 |
commit | ddefc7627d70c46dadfa934dd3754a2aff0dbfea (patch) | |
tree | 79ab3a703bd894c34a293615cf45b095c181663f /src/corelib/io/qurlidna.cpp | |
parent | 7a6a902e2d7fc6da7e91ab49d75291f905b846ce (diff) |
Remove qBinaryFind usages from QtCore
This is done per the mailing list discussion at
http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: I6207982c08c92f3e01fb236d2e7546a1c9acd287
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qurlidna.cpp')
-rw-r--r-- | src/corelib/io/qurlidna.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp index e959faccd2..ee95e590f9 100644 --- a/src/corelib/io/qurlidna.cpp +++ b/src/corelib/io/qurlidna.cpp @@ -42,6 +42,7 @@ #include "qurl_p.h" #include <QtCore/qstringlist.h> +#include <algorithm> QT_BEGIN_NAMESPACE @@ -1461,10 +1462,10 @@ static void mapToLowerCase(QString *str, int from) ++i; } } - const NameprepCaseFoldingEntry *entry = qBinaryFind(NameprepCaseFolding, - NameprepCaseFolding + N, - uc); - if ((entry - NameprepCaseFolding) != N) { + const NameprepCaseFoldingEntry *entry = std::lower_bound(NameprepCaseFolding, + NameprepCaseFolding + N, + uc); + if ((entry != NameprepCaseFolding + N) && !(uc < *entry)) { int l = 1; while (l < 4 && entry->mapping[l]) ++l; |