// We use copy constructor to ensure that both sides of equality operator
// are instances of MeasureUnit base class and not a subclass. Otherwise,
// operator== will immediately return false.
+ // TODO(Travis Keep): Propose
+ // UBool isUnitSame(const MeasureUnit &other) const to address performance
+ // issues around copy constructor.
for (int32_t i = 0; i < measureCount; ++i) {
if (MeasureUnit(measures[i].getUnit()) == *hourUnit) {
// hour must come first
TimeUnit::UTimeUnitFields field = tmunit_m->getTimeUnitField();
assertTrue("field of month time unit is month", (field == TimeUnit::UTIMEUNIT_MONTH));
- //===== Interopability with MeasureUnit ======
+ //===== Interoperability with MeasureUnit ======
MeasureUnit **ptrs = new MeasureUnit *[TimeUnit::UTIMEUNIT_FIELD_COUNT];
ptrs[TimeUnit::UTIMEUNIT_YEAR] = MeasureUnit::createYear(status);