mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Convert stream to bool explicitly
In C++11 there is no implicit conversion from iostream classes to `void*`, just an explicit conversion to bool.
This commit is contained in:
		
							parent
							
								
									9b979b6e1e
								
							
						
					
					
						commit
						f02d273ee3
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -76,7 +76,7 @@ void invoke_gdb() {
 | 
				
			||||||
    for (;;) {
 | 
					    for (;;) {
 | 
				
			||||||
        std::cerr << "(C)ontinue, (A)bort, (S)top, (T)hrow exception, Invoke (G)DB\n";
 | 
					        std::cerr << "(C)ontinue, (A)bort, (S)top, (T)hrow exception, Invoke (G)DB\n";
 | 
				
			||||||
        char result;
 | 
					        char result;
 | 
				
			||||||
        bool ok = (std::cin >> result);
 | 
					        bool ok = bool(std::cin >> result);
 | 
				
			||||||
        if (!ok) exit(ERR_INTERNAL_FATAL); // happens if std::cin is eof or unattached.
 | 
					        if (!ok) exit(ERR_INTERNAL_FATAL); // happens if std::cin is eof or unattached.
 | 
				
			||||||
        switch(result) {
 | 
					        switch(result) {
 | 
				
			||||||
        case 'C':
 | 
					        case 'C':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue