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

Side by Side Diff: third_party/WebKit/Source/core/dom/AttributeCollection.h

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 months 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void append(const QualifiedName&, const AtomicString& value); 115 void append(const QualifiedName&, const AtomicString& value);
116 void remove(unsigned index); 116 void remove(unsigned index);
117 }; 117 };
118 118
119 inline void MutableAttributeCollection::append(const QualifiedName& name, 119 inline void MutableAttributeCollection::append(const QualifiedName& name,
120 const AtomicString& value) { 120 const AtomicString& value) {
121 m_attributes.push_back(Attribute(name, value)); 121 m_attributes.push_back(Attribute(name, value));
122 } 122 }
123 123
124 inline void MutableAttributeCollection::remove(unsigned index) { 124 inline void MutableAttributeCollection::remove(unsigned index) {
125 m_attributes.remove(index); 125 m_attributes.erase(index);
126 } 126 }
127 127
128 template <typename Container, typename ContainerMemberType> 128 template <typename Container, typename ContainerMemberType>
129 inline typename AttributeCollectionGeneric<Container, 129 inline typename AttributeCollectionGeneric<Container,
130 ContainerMemberType>::iterator 130 ContainerMemberType>::iterator
131 AttributeCollectionGeneric<Container, ContainerMemberType>::find( 131 AttributeCollectionGeneric<Container, ContainerMemberType>::find(
132 const AtomicString& name, 132 const AtomicString& name,
133 bool shouldIgnoreCase) const { 133 bool shouldIgnoreCase) const {
134 size_t index = findIndex(name, shouldIgnoreCase); 134 size_t index = findIndex(name, shouldIgnoreCase);
135 return index != kNotFound ? &at(index) : nullptr; 135 return index != kNotFound ? &at(index) : nullptr;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 shouldIgnoreAttributeCase)) 214 shouldIgnoreAttributeCase))
215 return index; 215 return index;
216 } 216 }
217 } 217 }
218 return kNotFound; 218 return kNotFound;
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
222 222
223 #endif // AttributeCollection_h 223 #endif // AttributeCollection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698