mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Don't disable IO buffering at startup
It was never clear to me why we needed this trick, and now that we rely only on C++ std::getline() and std::cout for input / output it is even more a mistery what this code does. So disable it and wait to see if someone screams ;-) No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
348f824104
commit
efd2167998
1 changed files with 1 additions and 9 deletions
10
src/main.cpp
10
src/main.cpp
|
@ -17,7 +17,6 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -36,13 +35,6 @@ extern void kpk_bitbase_init();
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
// Disable IO buffering for C and C++ standard libraries
|
|
||||||
setvbuf(stdin, NULL, _IONBF, 0);
|
|
||||||
setvbuf(stdout, NULL, _IONBF, 0);
|
|
||||||
cout.rdbuf()->pubsetbuf(NULL, 0);
|
|
||||||
cin.rdbuf()->pubsetbuf(NULL, 0);
|
|
||||||
|
|
||||||
// Startup initializations
|
|
||||||
init_bitboards();
|
init_bitboards();
|
||||||
Position::init();
|
Position::init();
|
||||||
kpk_bitbase_init();
|
kpk_bitbase_init();
|
||||||
|
@ -58,7 +50,7 @@ int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
uci_loop(); // Enter the UCI loop and wait for user input
|
uci_loop(); // Enter the UCI loop and wait for user input
|
||||||
}
|
}
|
||||||
else if (string(argv[1]) == "bench" && argc < 8)
|
else if (string(argv[1]) == "bench")
|
||||||
benchmark(argc, argv);
|
benchmark(argc, argv);
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue