]> granicus.if.org Git - icu/commitdiff
Strip down ConversionRateInfo to only four CharStrings.
authorHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Thu, 19 Mar 2020 00:45:27 +0000 (01:45 +0100)
committerHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Thu, 19 Mar 2020 00:45:27 +0000 (01:45 +0100)
icu4c/source/i18n/unitsrouter.cpp
icu4c/source/i18n/unitsrouter.h

index 9e1215e2b793a592dfdf8298ee1c207af69462b1..89376c72de1d72f0c382b6d8723d50605a27464f 100644 (file)
@@ -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;
             }
         }
     }
index 98a9029b6dc4ba587f7fdadcbce657e337f375fc..7791b6b39c1f34ff3e560318eb69a544392a975e 100644 (file)
@@ -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 {