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)
class AttributeArray {
public:
- typedef const Attribute ValueType;
+ using ValueType = const Attribute;
AttributeArray(const Attribute* array, unsigned size)
: m_array(array)
{ }
};
-typedef Vector<Attribute, 4> AttributeVector;
+using AttributeVector = Vector<Attribute, 4>;
class MutableAttributeCollection : public AttributeCollectionGeneric<AttributeVector, AttributeVector&> {
public:
explicit MutableAttributeCollection(AttributeVector& attributes)
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>
if (it->name().matches(name))
return it;
}
- return 0;
+ return nullptr;
}
template <typename Container, typename ContainerMemberType>