| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 memcmp(m_binary->data(), other->m_binary->data(), | 76 memcmp(m_binary->data(), other->m_binary->data(), |
| 77 std::min(m_binary->size(), other->m_binary->size()))) | 77 std::min(m_binary->size(), other->m_binary->size()))) |
| 78 return result < 0 ? -1 : 1; | 78 return result < 0 ? -1 : 1; |
| 79 return compareNumbers(m_binary->size(), other->m_binary->size()); | 79 return compareNumbers(m_binary->size(), other->m_binary->size()); |
| 80 case StringType: | 80 case StringType: |
| 81 return codePointCompare(m_string, other->m_string); | 81 return codePointCompare(m_string, other->m_string); |
| 82 case DateType: | 82 case DateType: |
| 83 case NumberType: | 83 case NumberType: |
| 84 return compareNumbers(m_number, other->m_number); | 84 return compareNumbers(m_number, other->m_number); |
| 85 case InvalidType: | 85 case InvalidType: |
| 86 case MinType: | |
| 87 ASSERT_NOT_REACHED(); | 86 ASSERT_NOT_REACHED(); |
| 88 return 0; | 87 return 0; |
| 89 } | 88 } |
| 90 | 89 |
| 91 ASSERT_NOT_REACHED(); | 90 ASSERT_NOT_REACHED(); |
| 92 return 0; | 91 return 0; |
| 93 } | 92 } |
| 94 | 93 |
| 95 bool IDBKey::isLessThan(const IDBKey* other) const { | 94 bool IDBKey::isLessThan(const IDBKey* other) const { |
| 96 ASSERT(other); | 95 ASSERT(other); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 117 [](const Member<IDBKey> a, const Member<IDBKey> b) { | 116 [](const Member<IDBKey> a, const Member<IDBKey> b) { |
| 118 return a->isLessThan(b); | 117 return a->isLessThan(b); |
| 119 }); | 118 }); |
| 120 const auto end = std::unique(result.begin(), result.end()); | 119 const auto end = std::unique(result.begin(), result.end()); |
| 121 DCHECK_LE(static_cast<size_t>(end - result.begin()), result.size()); | 120 DCHECK_LE(static_cast<size_t>(end - result.begin()), result.size()); |
| 122 result.resize(end - result.begin()); | 121 result.resize(end - result.begin()); |
| 123 return result; | 122 return result; |
| 124 } | 123 } |
| 125 | 124 |
| 126 } // namespace blink | 125 } // namespace blink |
| OLD | NEW |