aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/misc.cpp9
-rw-r--r--src/misc.hpp5
-rw-r--r--src/uci.cpp2
3 files changed, 5 insertions, 11 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 6e87351..79cf74f 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -1,14 +1,9 @@
#include "misc.hpp"
#include "moves.hpp"
#include <cstdint>
-#include <string>
+#include <string_view>
-std::string version = "1";
-std::string name = "Mono";
-
-std::string engine_version() { return name + " " + version; };
-
-std::string engine_info() { return engine_version() + "\n"; }
+std::string_view engine_info() { return "Mono 1\n"; }
uint64_t MoveGenTest(int depth, Game *g) {
uint64_t num = 0;
diff --git a/src/misc.hpp b/src/misc.hpp
index c84edef..6d269b0 100644
--- a/src/misc.hpp
+++ b/src/misc.hpp
@@ -3,10 +3,9 @@
#include "board/board.hpp"
#include <cstdint>
-#include <string>
+#include <string_view>
-std::string engine_info();
-std::string engine_version();
+std::string_view engine_info();
uint64_t MoveGenTest(int depth, Game *g);
diff --git a/src/uci.cpp b/src/uci.cpp
index 5a4726a..23fe123 100644
--- a/src/uci.cpp
+++ b/src/uci.cpp
@@ -196,7 +196,7 @@ void Uci() {
DebugBitboards(&game);
}
if (cmd == "uci") {
- cout << "id name " << engine_version() << "\n";
+ cout << "id name " << engine_info();
cout << "uciok\n";
cout.flush();
}