diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 09cb4d1..ade22c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,19 +18,14 @@ static void perft(int argc, char *argv[]) { exit(1); } - int depth = -1; + uint32_t depth = 0; try { - depth = std::stoi(argv[2]); + depth = static_cast<uint32_t>(std::stoi(argv[2])); } catch (const std::exception &) { std::cout << "info string usage: ./mono perft <non-negative depth>\n"; exit(1); } - if (depth < 0) { - std::cout << "info string usage: ./mono perft <non-negative depth>\n"; - exit(1); - } - std::string fen = argv[3]; auto start = std::chrono::steady_clock::now(); |
