mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Add hasher and comparator for StringIdx.
This commit is contained in:
parent
d6835f3a7a
commit
b6db644ac6
@ -95,6 +95,22 @@ private:
|
||||
uint8_t m_idx[3];
|
||||
};
|
||||
|
||||
struct StringIdxHasher
|
||||
{
|
||||
size_t operator()( const StringIdx& key ) const
|
||||
{
|
||||
return charutil::hash( (const char*)&key, sizeof( StringIdx ) );
|
||||
}
|
||||
};
|
||||
|
||||
struct StringIdxComparator
|
||||
{
|
||||
bool operator()( const StringIdx& lhs, const StringIdx& rhs ) const
|
||||
{
|
||||
return memcmp( &lhs, &rhs, sizeof( StringIdx ) ) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
class Int24
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user