From 95d52a519042f6ce84a2896dffdfbe8c5741983b Mon Sep 17 00:00:00 2001 From: "dahyeong.kim" Date: Wed, 25 Sep 2013 10:51:55 +0900 Subject: [PATCH] [2.2.1]String::Contains() seems to block for long time for very long String. Remove needless while loop in Contains(). Change-Id: I6674f0f7691c7a2cee8de105c68429ce55b8d757 Signed-off-by: dahyeong.kim --- src/base/FBaseString.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/base/FBaseString.cpp b/src/base/FBaseString.cpp index bf69291..709adb9 100644 --- a/src/base/FBaseString.cpp +++ b/src/base/FBaseString.cpp @@ -1425,18 +1425,7 @@ String::Contains(const String& str) const return true; } - wchar_t* pStart = __pValue; - wchar_t* pEnd = pStart + __length; - while (pStart < pEnd) - { - while (wcsstr(pStart, str.__pValue) != null) - { - return true; - } - ++pStart; - } - - return false; + return (wcsstr(__pValue, str.__pValue) != null); } bool -- 2.7.4