From 505410a5c3b93f81deda8b9653c2237a433be5c1 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 15 Mar 2007 06:57:03 +0000 Subject: This version may break hashing of strings, but at least you can hash FStrings... templates are confusing. --- src/tests/fstring.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tests') diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp index cb85282..33e24b4 100644 --- a/src/tests/fstring.cpp +++ b/src/tests/fstring.cpp @@ -1,3 +1,4 @@ +#include "hash.h" #include "fstring.h" FString genThing() @@ -11,6 +12,11 @@ FString genThing() return bob; } +void thing( FString str ) +{ + printf("Hey: %s\n", str.c_str() ); +} + #define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.c_str(), str.c_str(), (unsigned int)str2.c_str(), str2.c_str() ); int main( int argc, char *argv ) { @@ -33,5 +39,9 @@ int main( int argc, char *argv ) str = str2; pem; + + thing( str2 ); + + printf("%d == %d\n", __calcHashCode( str ), __calcHashCode( str.c_str() ) ); } -- cgit v1.2.3