Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: icu52/patches/changeset_30255.patch

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu52/patches/breakiterator.patch ('k') | icu52/patches/clang.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Index: /icu/trunk/source/common/rbbi.cpp
2 ===================================================================
3 --- /icu/trunk/source/common/rbbi.cpp (revision 30203)
4 +++ /icu/trunk/source/common/rbbi.cpp (revision 30255)
5 @@ -1566,17 +1566,6 @@
6 //
7 // Clone the source BI into the caller-supplied buffer.
8 - // TODO: using an overloaded operator new to directly initialize the
9 - // copy in the user's buffer would be better, but it doesn't seem
10 - // to get along with namespaces. Investigate why.
11 //
12 - // The memcpy is only safe with an empty (default constructed)
13 - // break iterator. Use on others can screw up reference counts
14 - // to data. memcpy-ing objects is not really a good idea...
15 - //
16 - RuleBasedBreakIterator localIter; // Empty break iterator, source fo r memcpy
17 - RuleBasedBreakIterator *clone = (RuleBasedBreakIterator *)buf;
18 - uprv_memcpy(clone, &localIter, sizeof(RuleBasedBreakIterator)); // init C++ gorp, BreakIterator base class part
19 - clone->init(); // Init RuleBasedBreakIterator part, (user de fault constructor)
20 - *clone = *this; // clone = the real BI we want.
21 + RuleBasedBreakIterator *clone = new(buf) RuleBasedBreakIterator(*this);
22 clone->fBufferClone = TRUE; // Flag to prevent deleting storage on close (From C code)
OLDNEW
« no previous file with comments | « icu52/patches/breakiterator.patch ('k') | icu52/patches/clang.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698