aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-10-20 17:59:32 +0000
committerMike Buland <eichlan@xagasoft.com>2007-10-20 17:59:32 +0000
commitaddca63bba3ddaf212e44cdf16e95038b0a5bf3e (patch)
tree3aeded76d3104689485f6e66ba6a126c2bcf1287 /src/tests
parent640154682b767ec19cb9ac3972118c10bba8e780 (diff)
downloadlibbu++-addca63bba3ddaf212e44cdf16e95038b0a5bf3e.tar.gz
libbu++-addca63bba3ddaf212e44cdf16e95038b0a5bf3e.tar.bz2
libbu++-addca63bba3ddaf212e44cdf16e95038b0a5bf3e.tar.xz
libbu++-addca63bba3ddaf212e44cdf16e95038b0a5bf3e.zip
Just marked Bu::FString::c_str as deprecated, don't use it, it'll go away later.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fstratsptr.cpp4
-rw-r--r--src/tests/fstring.cpp9
2 files changed, 7 insertions, 6 deletions
diff --git a/src/tests/fstratsptr.cpp b/src/tests/fstratsptr.cpp
index 343f682..61c20bd 100644
--- a/src/tests/fstratsptr.cpp
+++ b/src/tests/fstratsptr.cpp
@@ -22,8 +22,8 @@ void Swap(PersonPtr one, PersonPtr two)
22 22
23 printf( 23 printf(
24 "%s %s\n", 24 "%s %s\n",
25 three->sFirstName->c_str(), 25 three->sFirstName->getStr(),
26 three->sLastName->c_str() ); 26 three->sLastName->getStr() );
27} 27}
28 28
29int main() 29int main()
diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp
index 11f147d..d20309a 100644
--- a/src/tests/fstring.cpp
+++ b/src/tests/fstring.cpp
@@ -27,13 +27,14 @@ Bu::FString genThing()
27 bob += "cd "; 27 bob += "cd ";
28 bob += "efg"; 28 bob += "efg";
29 29
30 printf("---bob------\n%08X: %s\n", (unsigned int)bob.c_str(), bob.c_str() ); 30 printf("---bob------\n%08X: %s\n", (unsigned int)bob.getStr(),
31 bob.getStr() );
31 return bob; 32 return bob;
32} 33}
33 34
34void thing( Bu::FString str ) 35void thing( Bu::FString str )
35{ 36{
36 printf("Hey: %s\n", str.c_str() ); 37 printf("Hey: %s\n", str.getStr() );
37} 38}
38 39
39void copyfunc( std::string temp ) 40void copyfunc( std::string temp )
@@ -107,7 +108,7 @@ void doTimings()
107 delete[] buf; 108 delete[] buf;
108} 109}
109 110
110#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() ); 111#define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.getStr(), str.getStr(), (unsigned int)str2.getStr(), str2.getStr() );
111int main( int argc, char *argv ) 112int main( int argc, char *argv )
112{ 113{
113 Bu::FString fs1; 114 Bu::FString fs1;
@@ -137,7 +138,7 @@ int main( int argc, char *argv )
137 thing( str2 ); 138 thing( str2 );
138 thing("test."); 139 thing("test.");
139 140
140 printf("%d == %d\n", Bu::__calcHashCode( str ), Bu::__calcHashCode( str.c_str() ) ); 141 printf("%d == %d\n", Bu::__calcHashCode( str ), Bu::__calcHashCode( str.getStr() ) );
141 142
142 doTimings(); 143 doTimings();
143} 144}