Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ********************************************************************** |
michael@0 | 3 | * Copyright (c) 2004-2011, International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ********************************************************************** |
michael@0 | 6 | * Author: Alan Liu |
michael@0 | 7 | * Created: April 20, 2004 |
michael@0 | 8 | * Since: ICU 3.0 |
michael@0 | 9 | ********************************************************************** |
michael@0 | 10 | */ |
michael@0 | 11 | #include "unicode/utypes.h" |
michael@0 | 12 | |
michael@0 | 13 | #if !UCONFIG_NO_FORMATTING |
michael@0 | 14 | |
michael@0 | 15 | #include "unicode/measfmt.h" |
michael@0 | 16 | #include "currfmt.h" |
michael@0 | 17 | |
michael@0 | 18 | U_NAMESPACE_BEGIN |
michael@0 | 19 | |
michael@0 | 20 | MeasureFormat::MeasureFormat() {} |
michael@0 | 21 | |
michael@0 | 22 | MeasureFormat::~MeasureFormat() {} |
michael@0 | 23 | |
michael@0 | 24 | MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(const Locale& locale, |
michael@0 | 25 | UErrorCode& ec) { |
michael@0 | 26 | CurrencyFormat* fmt = NULL; |
michael@0 | 27 | if (U_SUCCESS(ec)) { |
michael@0 | 28 | fmt = new CurrencyFormat(locale, ec); |
michael@0 | 29 | if (U_FAILURE(ec)) { |
michael@0 | 30 | delete fmt; |
michael@0 | 31 | fmt = NULL; |
michael@0 | 32 | } |
michael@0 | 33 | } |
michael@0 | 34 | return fmt; |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(UErrorCode& ec) { |
michael@0 | 38 | if (U_FAILURE(ec)) { |
michael@0 | 39 | return NULL; |
michael@0 | 40 | } |
michael@0 | 41 | return MeasureFormat::createCurrencyFormat(Locale::getDefault(), ec); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | U_NAMESPACE_END |
michael@0 | 45 | |
michael@0 | 46 | #endif /* #if !UCONFIG_NO_FORMATTING */ |