From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Thu, 19 Mar 2020 00:45:27 +0000 (+0100) Subject: Strip down ConversionRateInfo to only four CharStrings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d706fea922255cace4f4c07d016514915e140898;p=icu Strip down ConversionRateInfo to only four CharStrings. --- diff --git a/icu4c/source/i18n/unitsrouter.cpp b/icu4c/source/i18n/unitsrouter.cpp index 9e1215e2b79..89376c72de1 100644 --- a/icu4c/source/i18n/unitsrouter.cpp +++ b/icu4c/source/i18n/unitsrouter.cpp @@ -76,17 +76,14 @@ class ConvertUnitsSink : public ResourceSink { int32_t length; const UChar *f = value.getString(length, status); cr->factor.appendInvariantChars(f, length, status); - cr->factorUChar = f; } else if (uprv_strcmp(key, "offset") == 0) { int32_t length; const UChar *o = value.getString(length, status); cr->offset.appendInvariantChars(o, length, status); - cr->offsetUChar = o; } else if (uprv_strcmp(key, "target") == 0) { int32_t length; const UChar *t = value.getString(length, status); cr->target.appendInvariantChars(t, length, status); - cr->targetUChar = t; } } } diff --git a/icu4c/source/i18n/unitsrouter.h b/icu4c/source/i18n/unitsrouter.h index 98a9029b6dc..7791b6b39c1 100644 --- a/icu4c/source/i18n/unitsrouter.h +++ b/icu4c/source/i18n/unitsrouter.h @@ -50,15 +50,6 @@ struct ConversionRateInfo { CharString target; CharString factor; CharString offset; - - const UChar *factorUChar; - const UChar *offsetUChar; - // WIP: This is a UChar* so that it can point at the resource. We could - // convert it to a CharString and own it ourselves, or if we can trust - // another owner's lifetime management we can make it a char*. - const UChar *targetUChar; - - bool reciprocal = false; }; struct UnitPreference {