From: <ric...@us...> - 2013-06-24 06:08:08
|
Revision: 1188 http://sourceforge.net/p/loki-lib/code/1188 Author: rich_sposato Date: 2013-06-24 06:08:05 +0000 (Mon, 24 Jun 2013) Log Message: ----------- Changed cast style. Modified Paths: -------------- trunk/test/CheckReturn/main.cpp Modified: trunk/test/CheckReturn/main.cpp =================================================================== --- trunk/test/CheckReturn/main.cpp 2013-06-24 06:05:43 UTC (rev 1187) +++ trunk/test/CheckReturn/main.cpp 2013-06-24 06:08:05 UTC (rev 1188) @@ -136,7 +136,7 @@ BoolReturn checkBool = CheckRequired(); // and then deliberately ignores it before destructor runs. // Ignore any compiler warnings that says code does not check return value. - (bool)checkBool; + static_cast< bool >( checkBool ); cout << "Called CheckRequired, stored return value, and ignored it." << endl; } @@ -145,14 +145,14 @@ // This should not assert since caller deliberately chooses to not // check return value by casting to return value to correct type. // Ignore any compiler warnings that says code does not check return value. - (bool)CheckRequired(); + static_cast< bool >( CheckRequired() ); } { // This should not assert since caller deliberately chooses to not // check return value by casting to return value to correct type. // Ignore any compiler warnings that says code does not check return value. - (bool)CheckRequired( false ); + static_cast< bool >( CheckRequired( false ) ); cout << "Made a nested call to CheckRequired." << endl; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |