From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Mon, 11 May 2020 22:33:51 +0000 (+0200) Subject: fixup! Use UnitPreferences, drop getUnitsData and related. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e85c8cf981666b2b8e51492ea5b136d11df42fd1;p=icu fixup! Use UnitPreferences, drop getUnitsData and related. --- diff --git a/icu4c/source/i18n/unitsdata.h b/icu4c/source/i18n/unitsdata.h index 994f080151e..6961b301621 100644 --- a/icu4c/source/i18n/unitsdata.h +++ b/icu4c/source/i18n/unitsdata.h @@ -85,39 +85,6 @@ struct U_I18N_API UnitPreference : public UMemory { CharString skeleton; }; -/** - * Collects the data needed for converting the inputUnit type to output units - * for the given region and usage. - * - * WARNING: This function only supports simple units presently. - * WIP/TODO(hugovdm): add support for UMEASURE_UNIT_SEQUENCE and - * UMEASURE_UNIT_COMPOUND complexities. - * - * @param outputRegion The region code for which output preferences are desired - * (e.g. US or 001). - * @param usage The "usage" parameter, such as "person", "road", or "fluid". - * Unrecognised usages are treated as "default". - * @param inputUnit The input unit type: the type of the units that will be - * converted. - * @param category Output parameter, this will be set to the category associated - * with the inputUnit. TODO(hugovdm): this might get specified instead of - * requested. Or it may be unnecessary to return it. - * @param baseUnit Output parameter, this will be set to the base unit through - * which conversions are made (e.g. "kilogram", "meter", or "year"). - * TODO(hugovdm): find out if this is needed/useful. - * @param conversionInfo Output parameter, a vector of ConversionRateInfo - * instances needed to be able to convert from inputUnit to all the output units - * found in unitPreferences. - * @param unitPreferences Output parameter, a vector of all the output - * preferences for the given region, usage, and input unit type (which - * determines the category). - * @param status Receives status. - */ -void U_I18N_API getUnitsData(const char *outputRegion, const char *usage, const MeasureUnit &inputUnit, - CharString &category, MeasureUnit &baseUnit, - MaybeStackVector &conversionInfo, - MaybeStackVector &unitPreferences, UErrorCode &status); - namespace { /**