From a6028748b2cf20a25bdf9b06bc5fedf163c09b4d Mon Sep 17 00:00:00 2001 From: rich_sposato Date: Fri, 7 Oct 2011 07:04:46 +0000 Subject: [PATCH] Added lines to make type of stdout clear to compiler. git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1140 7ec92016-0320-0410-acc4-a06ded1c099a --- src/SafeFormat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SafeFormat.cpp b/src/SafeFormat.cpp index 0d6ddff..5c26acf 100644 --- a/src/SafeFormat.cpp +++ b/src/SafeFormat.cpp @@ -69,7 +69,8 @@ namespace Loki ::std::string buffer; const PrintfState< ::std::string &, char > state1( buffer, format ); ::std::fwrite( buffer.c_str(), 1, buffer.size(), stdout ); - PrintfState< std::FILE *, char > printState2 = state1.ChangeDevice( stdout ); + ::std::FILE * f = stdout; + PrintfState< std::FILE *, char > printState2( state1.ChangeDevice( f ) ); return printState2; } @@ -77,7 +78,8 @@ namespace Loki ::std::string buffer; const PrintfState< ::std::string &, char > state1( buffer, format.c_str() ); ::std::fwrite( buffer.c_str(), 1, buffer.size(), stdout ); - PrintfState< std::FILE *, char > printState2 = state1.ChangeDevice( stdout ); + ::std::FILE * f = stdout; + PrintfState< std::FILE *, char > printState2( state1.ChangeDevice( f ) ); return printState2; }