intl/icu/source/i18n/measfmt.cpp

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /*
     2 **********************************************************************
     3 * Copyright (c) 2004-2011, International Business Machines
     4 * Corporation and others.  All Rights Reserved.
     5 **********************************************************************
     6 * Author: Alan Liu
     7 * Created: April 20, 2004
     8 * Since: ICU 3.0
     9 **********************************************************************
    10 */
    11 #include "unicode/utypes.h"
    13 #if !UCONFIG_NO_FORMATTING
    15 #include "unicode/measfmt.h"
    16 #include "currfmt.h"
    18 U_NAMESPACE_BEGIN
    20 MeasureFormat::MeasureFormat() {}
    22 MeasureFormat::~MeasureFormat() {}
    24 MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(const Locale& locale,
    25                                                    UErrorCode& ec) {
    26     CurrencyFormat* fmt = NULL;
    27     if (U_SUCCESS(ec)) {
    28         fmt = new CurrencyFormat(locale, ec);
    29         if (U_FAILURE(ec)) {
    30             delete fmt;
    31             fmt = NULL;
    32         }
    33     }
    34     return fmt;
    35 }
    37 MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(UErrorCode& ec) {
    38     if (U_FAILURE(ec)) {
    39         return NULL;
    40     }
    41     return MeasureFormat::createCurrencyFormat(Locale::getDefault(), ec);
    42 }
    44 U_NAMESPACE_END
    46 #endif /* #if !UCONFIG_NO_FORMATTING */

mercurial