From 829142997f0fde73b7e2837e047f577472e80be1 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Sat, 12 Oct 2013 15:54:40 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE?= =?UTF-8?q?=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ustring.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ustring.cpp b/src/ustring.cpp index 7cf54d8..14f6bc3 100755 --- a/src/ustring.cpp +++ b/src/ustring.cpp @@ -354,15 +354,13 @@ bool ustring::operator!=( const ustring& str ) const std::size_t ustring::find(char32_t symbol, std::size_t pos /* = 0 */) const { char32_t* pBuf = _pData + pos; - std::size_t result = 0; do { if(*pBuf == symbol) { - return (result + pos); + return (pBuf - _pData); } - ++result; } while(*pBuf++ != 0);