Explicitly ignore return value of getchar

This silences MSVC warning about ignored return value
This commit is contained in:
Martin Hořeňovský 2017-08-22 22:06:37 +02:00
parent 27640a5a96
commit c03e8fce92

View File

@ -208,12 +208,12 @@ namespace Catch {
int run() {
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {
Catch::cout() << "...waiting for enter/ return before starting" << std::endl;
std::getchar();
static_cast<void>(std::getchar());
}
int exitCode = runInternal();
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {
Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl;
std::getchar();
static_cast<void>(std::getchar());
}
return exitCode;
}