mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#define BX_HASH_H_HEADER_GUARD
|
||||
|
||||
#include "allocator.h" // isAligned
|
||||
#include "string.h" // StringView
|
||||
|
||||
namespace bx
|
||||
{
|
||||
@@ -55,6 +56,12 @@ namespace bx
|
||||
template <typename Ty>
|
||||
uint32_t hashMurmur2A(const Ty& _data);
|
||||
|
||||
///
|
||||
uint32_t hashMurmur2A(const StringView& _data);
|
||||
|
||||
///
|
||||
uint32_t hashMurmur2A(const char* _data);
|
||||
|
||||
} // namespace bx
|
||||
|
||||
#include "hash.inl"
|
||||
|
||||
@@ -151,4 +151,14 @@ namespace bx
|
||||
return hashMurmur2A(&_data, sizeof(Ty) );
|
||||
}
|
||||
|
||||
inline uint32_t hashMurmur2A(const StringView& _data)
|
||||
{
|
||||
return hashMurmur2A(_data.getPtr(), _data.getLength() );
|
||||
}
|
||||
|
||||
inline uint32_t hashMurmur2A(const char* _data)
|
||||
{
|
||||
return hashMurmur2A(StringView(_data) );
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <wchar.h> // wchar_t
|
||||
|
||||
#include "allocator.h"
|
||||
#include "hash.h"
|
||||
|
||||
namespace bx
|
||||
{
|
||||
@@ -244,12 +243,6 @@ namespace bx
|
||||
///
|
||||
int32_t toString(char* _out, size_t _max, uint64_t _value, uint32_t _base = 10);
|
||||
|
||||
///
|
||||
uint32_t hashMurmur2A(const StringView& _data);
|
||||
|
||||
///
|
||||
uint32_t hashMurmur2A(const char* _data);
|
||||
|
||||
} // namespace bx
|
||||
|
||||
#include "string.inl"
|
||||
|
||||
@@ -116,16 +116,6 @@ namespace bx
|
||||
return m_len;
|
||||
}
|
||||
|
||||
inline uint32_t hashMurmur2A(const StringView& _data)
|
||||
{
|
||||
return hashMurmur2A(_data.getPtr(), _data.getLength() );
|
||||
}
|
||||
|
||||
inline uint32_t hashMurmur2A(const char* _data)
|
||||
{
|
||||
return hashMurmur2A(StringView(_data) );
|
||||
}
|
||||
|
||||
template<bx::AllocatorI** AllocatorT>
|
||||
inline StringT<AllocatorT>::StringT()
|
||||
: StringView()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "test.h"
|
||||
#include <bx/handlealloc.h>
|
||||
#include <bx/string.h>
|
||||
#include <bx/hash.h>
|
||||
|
||||
TEST_CASE("HandleListT", "")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user