aboutsummaryrefslogtreecommitdiff
path: root/src/utfstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/utfstring.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/utfstring.cpp b/src/utfstring.cpp
index ae5efaf..7ba04ec 100644
--- a/src/utfstring.cpp
+++ b/src/utfstring.cpp
@@ -1,29 +1,2 @@
1#include "bu/utfstring.h" 1#include "bu/utfstring.h"
2 2
3template class Bu::FBasicString<short>;
4
5template<> uint32_t Bu::__calcHashCode<Bu::UtfString>( const Bu::UtfString &k )
6{
7 long j, sz = k.getSize()*2;
8 const char *s = (const char *)k.getStr();
9
10 long nPos = 0;
11 for( j = 0; j < sz; j++, s++ )
12 {
13 nPos = *s + (nPos << 6) + (nPos << 16) - nPos;
14 }
15
16 return nPos;
17}
18
19template<> bool Bu::__cmpHashKeys<Bu::UtfString>(
20 const Bu::UtfString &a, const Bu::UtfString &b )
21{
22 return a == b;
23}
24
25template<> void Bu::__tracer_format<Bu::UtfString>( const Bu::UtfString &v )
26{
27 printf("(%ld)\"%s\"", v.getSize(), (const char *)v.getStr() );
28}
29