mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Explicitly ignore return value of getchar
This silences MSVC warning about ignored return value
This commit is contained in:
parent
27640a5a96
commit
c03e8fce92
@ -208,12 +208,12 @@ namespace Catch {
|
|||||||
int run() {
|
int run() {
|
||||||
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {
|
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) {
|
||||||
Catch::cout() << "...waiting for enter/ return before starting" << std::endl;
|
Catch::cout() << "...waiting for enter/ return before starting" << std::endl;
|
||||||
std::getchar();
|
static_cast<void>(std::getchar());
|
||||||
}
|
}
|
||||||
int exitCode = runInternal();
|
int exitCode = runInternal();
|
||||||
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {
|
if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) {
|
||||||
Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl;
|
Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl;
|
||||||
std::getchar();
|
static_cast<void>(std::getchar());
|
||||||
}
|
}
|
||||||
return exitCode;
|
return exitCode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user