Remove operators and hash specialization for archive attribute lists.

These methods were unused and they made the attribute list more complex.
This commit is contained in:
Grant Paul 2016-08-13 23:48:10 -07:00
parent 48886b57ae
commit 82120babf7
2 changed files with 0 additions and 33 deletions

View File

@ -39,10 +39,6 @@ private:
public:
AttributeList(std::unordered_map<enum car_attribute_identifier, uint16_t> const &values);
public:
bool operator==(AttributeList const &rhs) const;
bool operator!=(AttributeList const &rhs) const;
public:
/*
* Get the value of an attribute.
@ -104,14 +100,4 @@ public:
}
namespace std {
template<> struct hash<car::AttributeList>
{
/*
* Suport using an AttributeList as a key.
*/
size_t operator()(car::AttributeList const &attributes) const;
};
}
#endif /* _LIBCAR_ATTRIBUTELIST_H */

View File

@ -17,18 +17,6 @@ AttributeList(std::unordered_map<enum car_attribute_identifier, uint16_t> const
{
}
bool AttributeList::
operator==(AttributeList const &rhs) const
{
return _values == rhs._values;
}
bool AttributeList::
operator!=(AttributeList const &rhs) const
{
return !(*this == rhs);
}
ext::optional<uint16_t> AttributeList::
get(enum car_attribute_identifier identifier) const
{
@ -88,13 +76,6 @@ Load(size_t count, struct car_attribute_pair const *pairs)
return AttributeList(attributes);
}
size_t std::hash<AttributeList>::
operator()(AttributeList const &attributes) const
{
/* Not a great hash. */
return attributes.count();
}
std::vector<uint8_t> AttributeList::
write(size_t count, uint32_t const *identifiers) const
{