This commit is contained in:
Branimir Karadžić
2017-02-13 22:33:45 -08:00
parent b598afb88a
commit 543a1be4c9
5 changed files with 18 additions and 18 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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"

View File

@@ -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()