Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/core/style/QuotesData.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
35 35
36 void QuotesData::addPair(std::pair<String, String> quotePair) { 36 void QuotesData::addPair(std::pair<String, String> quotePair) {
37 m_quotePairs.append(quotePair); 37 m_quotePairs.append(quotePair);
38 } 38 }
39 39
40 const String QuotesData::getOpenQuote(int index) const { 40 const String QuotesData::getOpenQuote(int index) const {
41 ASSERT(index >= 0); 41 ASSERT(index >= 0);
42 if (!m_quotePairs.size() || index < 0) 42 if (!m_quotePairs.size() || index < 0)
43 return emptyString(); 43 return emptyString();
44 if ((size_t)index >= m_quotePairs.size()) 44 if ((size_t)index >= m_quotePairs.size())
45 return m_quotePairs.last().first; 45 return m_quotePairs.back().first;
46 return m_quotePairs.at(index).first; 46 return m_quotePairs.at(index).first;
47 } 47 }
48 48
49 const String QuotesData::getCloseQuote(int index) const { 49 const String QuotesData::getCloseQuote(int index) const {
50 ASSERT(index >= -1); 50 ASSERT(index >= -1);
51 if (!m_quotePairs.size() || index < 0) 51 if (!m_quotePairs.size() || index < 0)
52 return emptyString(); 52 return emptyString();
53 if ((size_t)index >= m_quotePairs.size()) 53 if ((size_t)index >= m_quotePairs.size())
54 return m_quotePairs.last().second; 54 return m_quotePairs.back().second;
55 return m_quotePairs.at(index).second; 55 return m_quotePairs.at(index).second;
56 } 56 }
57 57
58 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698