Chromium Code Reviews| Index: content/common/indexed_db/indexed_db_key.cc |
| =================================================================== |
| --- content/common/indexed_db/indexed_db_key.cc (revision 256983) |
| +++ content/common/indexed_db/indexed_db_key.cc (working copy) |
| @@ -121,17 +121,24 @@ |
| } |
| if (array_.size() < other.array_.size()) |
| return -1; |
| - if (array_.size() > other.array_.size()) |
| - return 1; |
| - return 0; |
| + return (array_.size() > other.array_.size()) ? 1 : 0; |
|
Peter Kasting
2014/03/18 02:55:54
(Was trying for a consistent style in this switch
|
| + |
| case WebIDBKeyTypeBinary: |
| return binary_.compare(other.binary_); |
| + |
| case WebIDBKeyTypeString: |
| return string_.compare(other.string_); |
| + |
| case WebIDBKeyTypeDate: |
| - return (date_ < other.date_) ? -1 : (date_ > other.date_) ? 1 : 0; |
| + if (date_ < other.date_) |
| + return -1; |
| + return (date_ > other.date_) ? 1 : 0; |
| + |
| case WebIDBKeyTypeNumber: |
| - return (number_ < other.number_) ? -1 : (number_ > other.number_) ? 1 : 0; |
| + if (number_ < other.number_) |
| + return -1; |
| + return (number_ > other.number_) ? 1 : 0; |
| + |
| case WebIDBKeyTypeInvalid: |
| case WebIDBKeyTypeNull: |
| case WebIDBKeyTypeMin: |
| @@ -139,8 +146,6 @@ |
| NOTREACHED(); |
| return 0; |
| } |
| - NOTREACHED(); |
| - return 0; |
| } |
| bool IndexedDBKey::IsLessThan(const IndexedDBKey& other) const { |