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

Unified Diff: Source/core/dom/AttributeCollection.h

Issue 674553002: Move parts of core/dom to C++11 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make Windows shut up when I just try following the style guide Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/AttributeCollection.h
diff --git a/Source/core/dom/AttributeCollection.h b/Source/core/dom/AttributeCollection.h
index d9ab832cfe8a4a3a1016082ffc4c27c9501b1312..9ea2ca08a696999fd56b20c62e7689554338a4ca 100644
--- a/Source/core/dom/AttributeCollection.h
+++ b/Source/core/dom/AttributeCollection.h
@@ -42,8 +42,8 @@ namespace blink {
template <typename Container, typename ContainerMemberType = Container>
class AttributeCollectionGeneric {
public:
- typedef typename Container::ValueType ValueType;
- typedef ValueType* iterator;
+ using ValueType = typename Container::ValueType;
+ using iterator = ValueType*;
AttributeCollectionGeneric(Container& attributes)
: m_attributes(attributes)
@@ -76,7 +76,7 @@ protected:
class AttributeArray {
public:
- typedef const Attribute ValueType;
+ using ValueType = const Attribute;
AttributeArray(const Attribute* array, unsigned size)
: m_array(array)
@@ -102,7 +102,7 @@ public:
{ }
};
-typedef Vector<Attribute, 4> AttributeVector;
+using AttributeVector = Vector<Attribute, 4>;
class MutableAttributeCollection : public AttributeCollectionGeneric<AttributeVector, AttributeVector&> {
public:
explicit MutableAttributeCollection(AttributeVector& attributes)
@@ -128,7 +128,7 @@ template <typename Container, typename ContainerMemberType>
inline typename AttributeCollectionGeneric<Container, ContainerMemberType>::iterator AttributeCollectionGeneric<Container, ContainerMemberType>::find(const AtomicString& name, bool shouldIgnoreCase) const
{
size_t index = findIndex(name, shouldIgnoreCase);
- return index != kNotFound ? &at(index) : 0;
+ return index != kNotFound ? &at(index) : nullptr;
}
template <typename Container, typename ContainerMemberType>
@@ -177,7 +177,7 @@ inline typename AttributeCollectionGeneric<Container, ContainerMemberType>::iter
if (it->name().matches(name))
return it;
}
- return 0;
+ return nullptr;
}
template <typename Container, typename ContainerMemberType>
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698