mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-12852 Remove some unnecessary copy (merge from bug)
X-SVN-Rev: 39542
This commit is contained in:
parent
8ae505f6dd
commit
68401040eb
5 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -193,7 +193,7 @@ private:
|
|||
|
||||
void setAlgorithmic(UBool algorithmic);
|
||||
|
||||
void setDesc(UnicodeString desc);
|
||||
void setDesc(const UnicodeString &desc);
|
||||
|
||||
void setName(const char* name);
|
||||
|
||||
|
|
|
@ -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)");
|
||||
|
|
Loading…
Add table
Reference in a new issue