- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/UIElements/TextUI/Query/BooleanTextQuery.cpp ¶
rd754bb r8df74d 22 22 #include <iostream> 23 23 24 #include "TextUI/ Query/TextQuery.hpp"24 #include "TextUI/TextDialog.hpp" 25 25 26 26 #include "Helpers/Log.hpp" … … 39 39 do{ 40 40 badInput = false; 41 std::cout << getDescription() << "[y/n]: ";42 std::cin >> input;41 Log() << Verbose(0) << getTitle(); 42 cin >> input; 43 43 if ((input == 'y' ) || (input == 'Y')) { 44 44 tmp = true; … … 47 47 } else { 48 48 badInput=true; 49 std::cin.clear();50 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');51 std::cout << "Input was not of [yYnN]!" << std::endl;49 cin.clear(); 50 cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 51 Log() << Verbose(0) << "Input was not of [yYnN]!" << endl; 52 52 } 53 53 } while(badInput); 54 54 // clear the input buffer of anything still in the line 55 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');55 cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 56 56 return true; 57 57 }
Note:
See TracChangeset
for help on using the changeset viewer.