Fixed more warnings and applied workaround for getting to std::numeric_limits without clashing with Windows' min() and max() macros.

This commit is contained in:
Phil Nash
2011-02-16 19:02:09 +00:00
parent dea778138e
commit 73acd945cd
18 changed files with 55 additions and 22 deletions
+4 -4
View File
@@ -34,7 +34,7 @@ namespace Catch
if( !config.getMessage().empty() )
{
std::cerr << config.getMessage() << std::endl;
return std::numeric_limits<int>::max();
return (std::numeric_limits<int>::max)();
}
// Handle help
@@ -70,7 +70,7 @@ namespace Catch
if( ofs.fail() )
{
std::cerr << "Unable to open file: '" << config.getFilename() << "'" << std::endl;
return std::numeric_limits<int>::max();
return (std::numeric_limits<int>::max)();
}
config.setStreamBuf( ofs.rdbuf() );
}
@@ -103,9 +103,9 @@ namespace Catch
config.getReporter()->EndGroup( *it, runner.getSuccessCount()-prevSuccess, runner.getFailureCount()-prevFail );
}
}
return runner.getFailureCount();
return static_cast<int>( runner.getFailureCount() );
}
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED