ICU-12852 Remove some unnecessary copy (merge from bug)

X-SVN-Rev: 39542
This commit is contained in:
Steven R. Loomis 2016-12-14 18:41:04 +00:00
parent 8ae505f6dd
commit 68401040eb
5 changed files with 5 additions and 5 deletions

View file

@ -174,7 +174,7 @@ struct DayPeriodRulesDataSink : public ResourceSink {
}
}
void addCutoff(CutoffType type, UnicodeString hour_str, UErrorCode &errorCode) {
void addCutoff(CutoffType type, const UnicodeString &hour_str, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return; }
if (type == CUTOFF_TYPE_UNKNOWN) {

View file

@ -475,7 +475,7 @@ struct AllowedHourFormatsSink : public ResourceSink {
}
}
AllowedHourFormat getHourFormatFromUnicodeString(UnicodeString s) {
AllowedHourFormat getHourFormatFromUnicodeString(const UnicodeString &s) {
if (s.length() == 1) {
if (s[0] == LOW_H) { return ALLOWED_HOUR_FORMAT_h; }
if (s[0] == CAP_H) { return ALLOWED_HOUR_FORMAT_H; }

View file

@ -230,7 +230,7 @@ void NumberingSystem::setAlgorithmic(UBool c) {
algorithmic = c;
}
void NumberingSystem::setDesc(UnicodeString d) {
void NumberingSystem::setDesc(const UnicodeString &d) {
desc.setTo(d);
}
void NumberingSystem::setName(const char *n) {

View file

@ -193,7 +193,7 @@ private:
void setAlgorithmic(UBool algorithmic);
void setDesc(UnicodeString desc);
void setDesc(const UnicodeString &desc);
void setName(const char* name);

View file

@ -358,7 +358,7 @@ static void millisToOffset(int32_t millis, UnicodeString& str) {
/*
* Create a default TZNAME from TZID
*/
static void getDefaultTZName(const UnicodeString tzid, UBool isDST, UnicodeString& zonename) {
static void getDefaultTZName(const UnicodeString &tzid, UBool isDST, UnicodeString& zonename) {
zonename = tzid;
if (isDST) {
zonename += UNICODE_STRING_SIMPLE("(DST)");