Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright (C) 2011 Nokia Inc. All rights reserved. | 2 * Copyright (C) 2011 Nokia Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 const String QuotesData::getCloseQuote(int index) const | 57 const String QuotesData::getCloseQuote(int index) const |
| 58 { | 58 { |
| 59 ASSERT(index >= -1); | 59 ASSERT(index >= -1); |
| 60 if (!m_quotePairs.size() || index < 0) | 60 if (!m_quotePairs.size() || index < 0) |
| 61 return emptyString(); | 61 return emptyString(); |
| 62 if ((size_t)index >= m_quotePairs.size()) | 62 if ((size_t)index >= m_quotePairs.size()) |
| 63 return m_quotePairs.last().second; | 63 return m_quotePairs.last().second; |
| 64 return m_quotePairs.at(index).second; | 64 return m_quotePairs.at(index).second; |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool QuotesData::equals(const QuotesData* a, const QuotesData* b) | 67 bool QuotesData::operator==(const QuotesData& a) |
| 68 { | 68 { |
| 69 if (a == b) | 69 return this->m_quotePairs == a.m_quotePairs; |
|
Sikugu_
2014/04/10 15:08:00
you can use m_quotePairs directly
no need to use
patro
2014/04/11 05:00:22
Done.
| |
| 70 return true; | |
| 71 if (!a || !b) | |
| 72 return false; | |
| 73 return a->m_quotePairs == b->m_quotePairs; | |
| 74 } | 70 } |
| 75 | 71 |
| 76 } // namespace WebCore | 72 } // namespace WebCore |
| OLD | NEW |