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

Side by Side Diff: source/i18n/fphdlimp.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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
« no previous file with comments | « source/i18n/fphdlimp.h ('k') | source/i18n/gregocal.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 2009-2010, International Business Machines Corporation and 3 * Copyright (C) 2009-2015, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ******************************************************************************* 5 *******************************************************************************
6 */ 6 */
7 7
8 #include "unicode/utypes.h" 8 #include "unicode/utypes.h"
9 9
10 #if !UCONFIG_NO_FORMATTING 10 #if !UCONFIG_NO_FORMATTING
11 11
12 #include "fphdlimp.h" 12 #include "fphdlimp.h"
13 #include "uvectr32.h" 13 #include "uvectr32.h"
14 14
15 U_NAMESPACE_BEGIN 15 U_NAMESPACE_BEGIN
16 16
17 // utility FieldPositionHandler 17 // utility FieldPositionHandler
18 // base class, null implementation 18 // base class, null implementation
19 19
20 FieldPositionHandler::~FieldPositionHandler() { 20 FieldPositionHandler::~FieldPositionHandler() {
21 } 21 }
22 22
23 void 23 void
24 FieldPositionHandler::addAttribute(int32_t, int32_t, int32_t) { 24 FieldPositionHandler::addAttribute(int32_t, int32_t, int32_t) {
25 } 25 }
26 26
27 void 27 void
28 FieldPositionHandler::shiftLast(int32_t) { 28 FieldPositionHandler::shiftLast(int32_t) {
29 } 29 }
30 30
31 UBool 31 UBool
32 FieldPositionHandler::isRecording(void) { 32 FieldPositionHandler::isRecording(void) const {
33 return FALSE; 33 return FALSE;
34 } 34 }
35 35
36 36
37 // utility subclass FieldPositionOnlyHandler 37 // utility subclass FieldPositionOnlyHandler
38 38
39 FieldPositionOnlyHandler::FieldPositionOnlyHandler(FieldPosition& _pos) 39 FieldPositionOnlyHandler::FieldPositionOnlyHandler(FieldPosition& _pos)
40 : pos(_pos) { 40 : pos(_pos) {
41 } 41 }
42 42
(...skipping 10 matching lines...) Expand all
53 53
54 void 54 void
55 FieldPositionOnlyHandler::shiftLast(int32_t delta) { 55 FieldPositionOnlyHandler::shiftLast(int32_t delta) {
56 if (delta != 0 && pos.getField() != FieldPosition::DONT_CARE && pos.getBeginIn dex() != -1) { 56 if (delta != 0 && pos.getField() != FieldPosition::DONT_CARE && pos.getBeginIn dex() != -1) {
57 pos.setBeginIndex(delta + pos.getBeginIndex()); 57 pos.setBeginIndex(delta + pos.getBeginIndex());
58 pos.setEndIndex(delta + pos.getEndIndex()); 58 pos.setEndIndex(delta + pos.getEndIndex());
59 } 59 }
60 } 60 }
61 61
62 UBool 62 UBool
63 FieldPositionOnlyHandler::isRecording(void) { 63 FieldPositionOnlyHandler::isRecording(void) const {
64 return pos.getField() != FieldPosition::DONT_CARE; 64 return pos.getField() != FieldPosition::DONT_CARE;
65 } 65 }
66 66
67 67
68 // utility subclass FieldPositionIteratorHandler 68 // utility subclass FieldPositionIteratorHandler
69 69
70 FieldPositionIteratorHandler::FieldPositionIteratorHandler(FieldPositionIterator * posIter, 70 FieldPositionIteratorHandler::FieldPositionIteratorHandler(FieldPositionIterator * posIter,
71 UErrorCode& _status) 71 UErrorCode& _status)
72 : iter(posIter), vec(NULL), status(_status) { 72 : iter(posIter), vec(NULL), status(_status) {
73 if (iter && U_SUCCESS(status)) { 73 if (iter && U_SUCCESS(status)) {
(...skipping 30 matching lines...) Expand all
104 if (i > 0) { 104 if (i > 0) {
105 --i; 105 --i;
106 vec->setElementAt(delta + vec->elementAti(i), i); 106 vec->setElementAt(delta + vec->elementAti(i), i);
107 --i; 107 --i;
108 vec->setElementAt(delta + vec->elementAti(i), i); 108 vec->setElementAt(delta + vec->elementAti(i), i);
109 } 109 }
110 } 110 }
111 } 111 }
112 112
113 UBool 113 UBool
114 FieldPositionIteratorHandler::isRecording(void) { 114 FieldPositionIteratorHandler::isRecording(void) const {
115 return U_SUCCESS(status); 115 return U_SUCCESS(status);
116 } 116 }
117 117
118 U_NAMESPACE_END 118 U_NAMESPACE_END
119 119
120 #endif /* !UCONFIG_NO_FORMATTING */ 120 #endif /* !UCONFIG_NO_FORMATTING */
OLDNEW
« no previous file with comments | « source/i18n/fphdlimp.h ('k') | source/i18n/gregocal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698