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

Side by Side Diff: public/common/unicode/unistr.h

Issue 8333007: Fix a gcc 4.6 compiler warning. (Closed) Base URL: http://git.chromium.org/chromium/deps/icu46.git@master
Patch Set: Created 9 years, 2 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 | « patches/gcc4.6.patch ('k') | no next file » | 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) 1998-2010, International Business Machines 3 * Copyright (C) 1998-2010, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ********************************************************************** 5 **********************************************************************
6 * 6 *
7 * File unistr.h 7 * File unistr.h
8 * 8 *
9 * Modification History: 9 * Modification History:
10 * 10 *
(...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after
4014 int32_t _length, 4014 int32_t _length,
4015 UChar srcChar) 4015 UChar srcChar)
4016 { return doReplace(start, _length, &srcChar, 0, 1); } 4016 { return doReplace(start, _length, &srcChar, 0, 1); }
4017 4017
4018 inline UnicodeString& 4018 inline UnicodeString&
4019 UnicodeString::replace(int32_t start, 4019 UnicodeString::replace(int32_t start,
4020 int32_t _length, 4020 int32_t _length,
4021 UChar32 srcChar) { 4021 UChar32 srcChar) {
4022 UChar buffer[U16_MAX_LENGTH]; 4022 UChar buffer[U16_MAX_LENGTH];
4023 int32_t count = 0; 4023 int32_t count = 0;
4024 UBool isError = FALSE; 4024 U16_APPEND_UNSAFE(buffer, count, srcChar);
4025 U16_APPEND(buffer, count, U16_MAX_LENGTH, srcChar, isError);
4026 return doReplace(start, _length, buffer, 0, count); 4025 return doReplace(start, _length, buffer, 0, count);
4027 } 4026 }
4028 4027
4029 inline UnicodeString& 4028 inline UnicodeString&
4030 UnicodeString::replaceBetween(int32_t start, 4029 UnicodeString::replaceBetween(int32_t start,
4031 int32_t limit, 4030 int32_t limit,
4032 const UnicodeString& srcText) 4031 const UnicodeString& srcText)
4033 { return doReplace(start, limit - start, srcText, 0, srcText.length()); } 4032 { return doReplace(start, limit - start, srcText, 0, srcText.length()); }
4034 4033
4035 inline UnicodeString& 4034 inline UnicodeString&
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 { return doReplace(length(), 0, srcChars, 0, srcLength); } 4316 { return doReplace(length(), 0, srcChars, 0, srcLength); }
4318 4317
4319 inline UnicodeString& 4318 inline UnicodeString&
4320 UnicodeString::append(UChar srcChar) 4319 UnicodeString::append(UChar srcChar)
4321 { return doReplace(length(), 0, &srcChar, 0, 1); } 4320 { return doReplace(length(), 0, &srcChar, 0, 1); }
4322 4321
4323 inline UnicodeString& 4322 inline UnicodeString&
4324 UnicodeString::append(UChar32 srcChar) { 4323 UnicodeString::append(UChar32 srcChar) {
4325 UChar buffer[U16_MAX_LENGTH]; 4324 UChar buffer[U16_MAX_LENGTH];
4326 int32_t _length = 0; 4325 int32_t _length = 0;
4327 UBool isError = FALSE; 4326 U16_APPEND_UNSAFE(buffer, _length, srcChar);
4328 U16_APPEND(buffer, _length, U16_MAX_LENGTH, srcChar, isError);
4329 return doReplace(length(), 0, buffer, 0, _length); 4327 return doReplace(length(), 0, buffer, 0, _length);
4330 } 4328 }
4331 4329
4332 inline UnicodeString& 4330 inline UnicodeString&
4333 UnicodeString::operator+= (UChar ch) 4331 UnicodeString::operator+= (UChar ch)
4334 { return doReplace(length(), 0, &ch, 0, 1); } 4332 { return doReplace(length(), 0, &ch, 0, 1); }
4335 4333
4336 inline UnicodeString& 4334 inline UnicodeString&
4337 UnicodeString::operator+= (UChar32 ch) { 4335 UnicodeString::operator+= (UChar32 ch) {
4338 return append(ch); 4336 return append(ch);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
4437 { return doReverse(0, length()); } 4435 { return doReverse(0, length()); }
4438 4436
4439 inline UnicodeString& 4437 inline UnicodeString&
4440 UnicodeString::reverse(int32_t start, 4438 UnicodeString::reverse(int32_t start,
4441 int32_t _length) 4439 int32_t _length)
4442 { return doReverse(start, _length); } 4440 { return doReverse(start, _length); }
4443 4441
4444 U_NAMESPACE_END 4442 U_NAMESPACE_END
4445 4443
4446 #endif 4444 #endif
OLDNEW
« no previous file with comments | « patches/gcc4.6.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698