diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 02:14:08 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 02:14:08 +0000 |
| commit | f5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch) | |
| tree | 4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/utfstring.cpp | |
| parent | 10c557562e1d67c55314c212371ea9cb7f802863 (diff) | |
| download | libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2 libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip | |
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to 'src/utfstring.cpp')
| -rw-r--r-- | src/utfstring.cpp | 27 |
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 | ||
| 3 | template class Bu::FBasicString<short>; | ||
| 4 | |||
| 5 | template<> 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 | |||
| 19 | template<> bool Bu::__cmpHashKeys<Bu::UtfString>( | ||
| 20 | const Bu::UtfString &a, const Bu::UtfString &b ) | ||
| 21 | { | ||
| 22 | return a == b; | ||
| 23 | } | ||
| 24 | |||
| 25 | template<> void Bu::__tracer_format<Bu::UtfString>( const Bu::UtfString &v ) | ||
| 26 | { | ||
| 27 | printf("(%ld)\"%s\"", v.getSize(), (const char *)v.getStr() ); | ||
| 28 | } | ||
| 29 | |||
