} // namespace
- void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, SigNum sigNum,
+// Conceptually, this modifies factor: factor *= baseStr^(signum*power).
+//
+// baseStr must be a known constant or a value that strToDouble() is able to
+// parse.
+ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Signum signum,
Factor &factor, UErrorCode &status) {
-
if (baseStr == "ft_to_m") {
- factor.constants[CONSTANT_FT2M] += power * sigNum;
+ factor.constants[CONSTANT_FT2M] += power * signum;
} else if (baseStr == "ft2_to_m2") {
- factor.constants[CONSTANT_FT2M] += 2 * power * sigNum;
+ factor.constants[CONSTANT_FT2M] += 2 * power * signum;
} else if (baseStr == "ft3_to_m3") {
- factor.constants[CONSTANT_FT2M] += 3 * power * sigNum;
+ factor.constants[CONSTANT_FT2M] += 3 * power * signum;
} else if (baseStr == "in3_to_m3") {
- factor.constants[CONSTANT_FT2M] += 3 * power * sigNum;
+ factor.constants[CONSTANT_FT2M] += 3 * power * signum;
factor.factorDen *= 12 * 12 * 12;
} else if (baseStr == "gal_to_m3") {
factor.factorNum *= 231;