Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(246)

Unified Diff: icu4c/source/i18n/decimalformatpattern.cpp

Issue 335150043: Refreshing Number Parsing: ICU4J Base URL: svn+icussh://source.icu-project.org/repos/icu/trunk/
Patch Set: Replying to Andy feedback round one. See commit message. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu4c/source/i18n/currdisplayinfo.cpp ('k') | icu4c/source/i18n/i18n.vcxproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu4c/source/i18n/decimalformatpattern.cpp
===================================================================
--- icu4c/source/i18n/decimalformatpattern.cpp (revision 40724)
+++ icu4c/source/i18n/decimalformatpattern.cpp (working copy)
@@ -50,10 +50,12 @@
parseError.preContext[stop-start] = 0;
//for post-context
- start = pos+1;
- stop = ((pos+U_PARSE_CONTEXT_LEN)<=pattern.length()) ? (pos+(U_PARSE_CONTEXT_LEN-1)) :
- pattern.length();
- pattern.extract(start,stop-start,parseError.postContext,0);
+ start = pattern.moveIndex32(pos, 1);
+ stop = pos + U_PARSE_CONTEXT_LEN - 1;
+ if (stop > pattern.length()) {
+ stop = pattern.length();
+ }
+ pattern.extract(start, stop - start, parseError.postContext, 0);
//null terminate the buffer
parseError.postContext[stop-start]= 0;
}
« no previous file with comments | « icu4c/source/i18n/currdisplayinfo.cpp ('k') | icu4c/source/i18n/i18n.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b