From 143a7f6d1c3d0f7059707a8ef4ab2f9dc31357c3 Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Fri, 21 Oct 2011 23:10:53 +0000 Subject: [PATCH] Now calls functions that print directly to cout. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1161 7ec92016-0320-0410-acc4-a06ded1c099a --- test/SafeFormat/main.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/SafeFormat/main.cpp b/test/SafeFormat/main.cpp index dd39244..ff43ac7 100644 --- a/test/SafeFormat/main.cpp +++ b/test/SafeFormat/main.cpp @@ -177,7 +177,7 @@ void FormatTest( void ) string result; unsigned int i = 1; signed short ss = 2; - float f = 3.4; + float f = 3.4F; const char * message = " over here! "; const char * format = ""; @@ -365,6 +365,20 @@ void RandomTest( unsigned int loopCount ) // ---------------------------------------------------------------------------- +void * DoLokiFPrintfLoop( void * p ) +{ + const unsigned int threadIndex = reinterpret_cast< unsigned int >( p ); + + for ( unsigned int loop = 0; loop < 10; ++loop ) + { + ::Loki::FPrintf( "Loop: [%u] Thread: [%u]\n" )( loop )( threadIndex ); + } + + return 0; +} + +// ---------------------------------------------------------------------------- + void * DoLokiPrintfLoop( void * p ) { const unsigned int threadIndex = reinterpret_cast< unsigned int >( p ); @@ -379,13 +393,13 @@ void * DoLokiPrintfLoop( void * p ) // ---------------------------------------------------------------------------- -void * DoLokiFPrintfLoop( void * p ) +void * DoStdOutLoop( void * p ) { const unsigned int threadIndex = reinterpret_cast< unsigned int >( p ); for ( unsigned int loop = 0; loop < 10; ++loop ) { - ::Loki::FPrintf( cout, "Loop: [%u] Thread: [%u]\n" )( loop )( threadIndex ); + printf( "Loop: [%d] Thread: [%d]\n", loop, threadIndex ); } return 0; @@ -407,20 +421,6 @@ void * DoCoutLoop( void * p ) // ---------------------------------------------------------------------------- -void * DoStdOutLoop( void * p ) -{ - const unsigned int threadIndex = reinterpret_cast< unsigned int >( p ); - - for ( unsigned int loop = 0; loop < 10; ++loop ) - { - printf( "Loop: [%d] Thread: [%d]\n", loop, threadIndex ); - } - - return 0; -} - -// ---------------------------------------------------------------------------- - void AtomicTest( void ) { char ender;