| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2008-2010, Google, International Business Machines Corporation
and | 3 * Copyright (C) 2008-2010, Google, International Business Machines Corporation
and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <typeinfo> // for 'typeid' to work | |
| 9 | 8 |
| 10 #include "unicode/tmunit.h" | 9 #include "unicode/tmunit.h" |
| 11 | 10 |
| 12 #if !UCONFIG_NO_FORMATTING | 11 #if !UCONFIG_NO_FORMATTING |
| 13 | 12 |
| 14 U_NAMESPACE_BEGIN | 13 U_NAMESPACE_BEGIN |
| 15 | 14 |
| 16 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) | 15 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeUnit) |
| 17 | 16 |
| 18 | 17 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 if (this == &other) { | 89 if (this == &other) { |
| 91 return *this; | 90 return *this; |
| 92 } | 91 } |
| 93 fTimeUnitField = other.fTimeUnitField; | 92 fTimeUnitField = other.fTimeUnitField; |
| 94 return *this; | 93 return *this; |
| 95 } | 94 } |
| 96 | 95 |
| 97 | 96 |
| 98 UBool | 97 UBool |
| 99 TimeUnit::operator==(const UObject& other) const { | 98 TimeUnit::operator==(const UObject& other) const { |
| 100 return (typeid(*this) == typeid(other) | 99 return (CR_TYPEID(*this) == CR_TYPEID(other) |
| 101 && fTimeUnitField == ((TimeUnit*)&other)->fTimeUnitField); | 100 && fTimeUnitField == ((TimeUnit*)&other)->fTimeUnitField); |
| 102 } | 101 } |
| 103 | 102 |
| 104 | 103 |
| 105 TimeUnit::UTimeUnitFields | 104 TimeUnit::UTimeUnitFields |
| 106 TimeUnit::getTimeUnitField() const { | 105 TimeUnit::getTimeUnitField() const { |
| 107 return fTimeUnitField; | 106 return fTimeUnitField; |
| 108 } | 107 } |
| 109 | 108 |
| 110 | 109 |
| 111 TimeUnit::~TimeUnit() { | 110 TimeUnit::~TimeUnit() { |
| 112 } | 111 } |
| 113 | 112 |
| 114 | 113 |
| 115 U_NAMESPACE_END | 114 U_NAMESPACE_END |
| 116 | 115 |
| 117 #endif | 116 #endif |
| OLD | NEW |