src/third_party/icu/source/i18n/units_converter.cpp
// Load factor for a single source
Load factor for a single source
Load factor for a single source
Factor loadSingleFactor(StringPiece source, const ConversionRates &ratesInfo, UErrorCode &status) {
    const auto conversionUnit = ratesInfo.extractConversionInfo(source, status);
    if (U_FAILURE(status)) return Factor();
    if (conversionUnit == nullptr) {
        status = U_INTERNAL_PROGRAM_ERROR;
        return Factor();
    }
    Factor result = extractFactorConversions(conversionUnit->factor.toStringPiece(), status);
    result.offset = strHasDivideSignToDouble(conversionUnit->offset.toStringPiece(), status);
    return result;
}
Factor loadSingleFactor ( StringPiece source , const ConversionRates & ratesInfo , UErrorCode & status ) { const auto conversionUnit = ratesInfo . extractConversionInfo ( source , status ) ; if ( U_FAILURE ( status ) ) return Factor ( ) ; if ( conversionUnit == nullptr ) { status = U_INTERNAL_PROGRAM_ERROR ; return Factor ( ) ; } Factor result = extractFactorConversions ( conversionUnit -> factor . toStringPiece ( ) , status ) ; result . offset = strHasDivideSignToDouble ( conversionUnit -> offset . toStringPiece ( ) , status ) ; return result ; }
Load factor for a single source
Load factor for a single source