]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/currfmt.cpp
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / currfmt.cpp
index d3de2ab633d64fc39331bcb696407df03559e68a..06bdad042aad0e1589f8d25494b4afd759e7737c 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **********************************************************************
-* Copyright (c) 2004-2012 International Business Machines
+* Copyright (c) 2004-2014 International Business Machines
 * Corporation and others.  All Rights Reserved.
 **********************************************************************
 * Author: Alan Liu
@@ -8,8 +10,6 @@
 * Since: ICU 3.0
 **********************************************************************
 */
-#include <typeinfo>  // for 'typeid' to work
-
 #include "unicode/utypes.h"
 
 #if !UCONFIG_NO_FORMATTING
@@ -21,7 +21,7 @@
 U_NAMESPACE_BEGIN
 
 CurrencyFormat::CurrencyFormat(const Locale& locale, UErrorCode& ec) :
-    fmt(NULL)
+    MeasureFormat(locale, UMEASFMT_WIDTH_WIDE, ec), fmt(NULL)
 {
     fmt = NumberFormat::createCurrencyInstance(locale, ec);
 }
@@ -36,17 +36,6 @@ CurrencyFormat::~CurrencyFormat() {
     delete fmt;
 }
 
-UBool CurrencyFormat::operator==(const Format& other) const {
-    if (this == &other) {
-        return TRUE;
-    }
-    if (typeid(*this) != typeid(other)) {
-        return FALSE;
-    }
-    const CurrencyFormat* c = (const CurrencyFormat*) &other;
-    return *fmt == *c->fmt;
-}
-
 Format* CurrencyFormat::clone() const {
     return new CurrencyFormat(*this);
 }