mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Explicitly ignore return value of getchar
This silences MSVC warning about ignored return value
This commit is contained in:
		| @@ -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; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský