Update use of Quantity in other classes

This commit is contained in:
Clayton Coleman
2016-05-17 00:36:56 -04:00
parent b2a01d4d94
commit 5e4308f91d
37 changed files with 204 additions and 242 deletions

View File

@@ -58,16 +58,7 @@ var Semantic = conversion.EqualitiesOrDie(
// TODO: if we decide it's important, it should be safe to start comparing the format.
//
// Uninitialized quantities are equivalent to 0 quantities.
if a.Amount == nil && b.MilliValue() == 0 {
return true
}
if b.Amount == nil && a.MilliValue() == 0 {
return true
}
if a.Amount == nil || b.Amount == nil {
return false
}
return a.Amount.Cmp(b.Amount) == 0
return a.Cmp(b) == 0
},
func(a, b unversioned.Time) bool {
return a.UTC() == b.UTC()