mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 20:15:00 +00:00
LibUnicode: Define traits for a vector of integral/enum types
Any generator which defines a unique storage instance for a list of numbers will need this.
This commit is contained in:
parent
6bf50bc40b
commit
415763b1b3
2 changed files with 22 additions and 14 deletions
|
@ -130,20 +130,6 @@ struct AK::Traits<NumberFormat> : public GenericTraits<NumberFormat> {
|
|||
};
|
||||
|
||||
using NumberFormatList = Vector<NumberFormatIndexType>;
|
||||
|
||||
template<>
|
||||
struct AK::Traits<NumberFormatList> : public GenericTraits<NumberFormatList> {
|
||||
static unsigned hash(NumberFormatList const& formats)
|
||||
{
|
||||
auto hash = int_hash(static_cast<u32>(formats.size()));
|
||||
|
||||
for (auto format : formats)
|
||||
hash = pair_int_hash(hash, format);
|
||||
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
using NumericSymbolList = Vector<StringIndexType>;
|
||||
|
||||
struct NumberSystem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue