| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (c) 2004-2010, International Business Machines | 3 * Copyright (c) 2004-2010, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 * Author: Alan Liu | 6 * Author: Alan Liu |
| 7 * Created: April 26, 2004 | 7 * Created: April 26, 2004 |
| 8 * Since: ICU 3.0 | 8 * Since: ICU 3.0 |
| 9 ********************************************************************** | 9 ********************************************************************** |
| 10 */ | 10 */ |
| 11 #include <typeinfo> // for 'typeid' to work | |
| 12 | 11 |
| 13 #include "unicode/utypes.h" | 12 #include "unicode/utypes.h" |
| 14 | 13 |
| 15 #if !UCONFIG_NO_FORMATTING | 14 #if !UCONFIG_NO_FORMATTING |
| 16 | 15 |
| 17 #include "unicode/currunit.h" | 16 #include "unicode/currunit.h" |
| 18 #include "unicode/ustring.h" | 17 #include "unicode/ustring.h" |
| 19 | 18 |
| 20 U_NAMESPACE_BEGIN | 19 U_NAMESPACE_BEGIN |
| 21 | 20 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 44 | 43 |
| 45 UObject* CurrencyUnit::clone() const { | 44 UObject* CurrencyUnit::clone() const { |
| 46 return new CurrencyUnit(*this); | 45 return new CurrencyUnit(*this); |
| 47 } | 46 } |
| 48 | 47 |
| 49 CurrencyUnit::~CurrencyUnit() { | 48 CurrencyUnit::~CurrencyUnit() { |
| 50 } | 49 } |
| 51 | 50 |
| 52 UBool CurrencyUnit::operator==(const UObject& other) const { | 51 UBool CurrencyUnit::operator==(const UObject& other) const { |
| 53 const CurrencyUnit& c = (const CurrencyUnit&) other; | 52 const CurrencyUnit& c = (const CurrencyUnit&) other; |
| 54 return typeid(*this) == typeid(other) && | 53 return CR_TYPEID(*this) == CR_TYPEID(other) && |
| 55 u_strcmp(isoCode, c.isoCode) == 0; | 54 u_strcmp(isoCode, c.isoCode) == 0; |
| 56 } | 55 } |
| 57 | 56 |
| 58 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyUnit) | 57 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyUnit) |
| 59 | 58 |
| 60 U_NAMESPACE_END | 59 U_NAMESPACE_END |
| 61 | 60 |
| 62 #endif // !UCONFIG_NO_FORMATTING | 61 #endif // !UCONFIG_NO_FORMATTING |
| OLD | NEW |