mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Replace some std::string occurrences with std::string_view
std::string_view is more lightweight than std::string. Furthermore, std::string_view variables can be declared constexpr. closes https://github.com/official-stockfish/Stockfish/pull/4328 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
5a88c5bb9b
commit
e9e7a7b83f
@@ -24,9 +24,10 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
||||
#include "../bitboard.h"
|
||||
#include "../movegen.h"
|
||||
@@ -70,7 +71,7 @@ enum TBFlag { STM = 1, Mapped = 2, WinPlies = 4, LossPlies = 8, Wide = 16, Singl
|
||||
inline WDLScore operator-(WDLScore d) { return WDLScore(-int(d)); }
|
||||
inline Square operator^(Square s, int i) { return Square(int(s) ^ i); }
|
||||
|
||||
const std::string PieceToChar = " PNBRQK pnbrqk";
|
||||
constexpr std::string_view PieceToChar = " PNBRQK pnbrqk";
|
||||
|
||||
int MapPawns[SQUARE_NB];
|
||||
int MapB1H1H7[SQUARE_NB];
|
||||
|
||||
Reference in New Issue
Block a user