[Webkit-unassigned] [Bug 50245] Add word-prefix search options to the text search without ICU

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 17 13:38:08 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=50245


yi shen <yi.4.shen at nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yi.4.shen at nokia.com




--- Comment #5 from yi shen <yi.4.shen at nokia.com>  2011-06-17 13:38:08 PST ---
I agree that memmove is a better way, but I think memcpy is fine in this case since the source is after the destination,right?

e.g,
str = "0123456789"
memcpy(str+2, str+1, 3);
returns: 0111356789

memcpy(str+1, str+2, 3);
returns: 0234456789

Anyway, I will change it.

(In reply to comment #3)
> > > Source/WebCore/editing/TextIterator.cpp:2236
> > > +            memcpy(m_context.data(), m_context.data() + 1, (m_context.size() - 1) * sizeof(UChar));
> > 
> > memcpy to overlapped place may cause unexpected results?
> 
> I think memmove is a better way to do it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list