]> granicus.if.org Git - icu/commitdiff
Pass StringPiece instances to getPreferencesFor.
authorHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 9 Jun 2020 21:59:21 +0000 (23:59 +0200)
committerHugo van der Merwe <17109322+hugovdm@users.noreply.github.com>
Tue, 9 Jun 2020 21:59:21 +0000 (23:59 +0200)
icu4c/source/i18n/unitsrouter.cpp

index 7074c8166ce9083c8bd21beede0de05547120a47..1129b73586c739cd75c5675afe8f4e3612f73f1d 100644 (file)
@@ -32,8 +32,7 @@ UnitsRouter::UnitsRouter(MeasureUnit inputUnit, StringPiece region, StringPiece
     // TODO: deal correctly with StringPiece / null-terminated string incompatibility...
     const UnitPreference *const *unitPreferences;
     int32_t preferencesCount;
-    prefs.getPreferencesFor(category.data(), usage.data(), region.data(), unitPreferences,
-                            preferencesCount, status);
+    prefs.getPreferencesFor(category.data(), usage, region, unitPreferences, preferencesCount, status);
 
     for (int i = 0; i < preferencesCount; ++i) {
         const auto &preference = *unitPreferences[i];