mirror of
https://github.com/darlinghq/xcbuild.git
synced 2025-02-22 09:22:34 +00:00
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:
parent
48886b57ae
commit
82120babf7
@ -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 */
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user