Cleanup includes

Reorder a few includes, include "position.h" where it was previously missing
and apply include-what-you-use suggestions. Also make the order of the includes
consistent, in the following way:

1. Related header (for .cpp files)
2. A blank line
3. C/C++ headers
4. A blank line
5. All other header files

closes https://github.com/official-stockfish/Stockfish/pull/4763
fixes https://github.com/official-stockfish/Stockfish/issues/4707

No functional change
This commit is contained in:
Disservin
2023-08-23 19:36:55 +02:00
committed by Stéphane Nicolet
parent 8cd5cbf693
commit 3c0e86a91e
42 changed files with 226 additions and 96 deletions
+12 -7
View File
@@ -16,33 +16,38 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tbprobe.h"
#include <sys/stat.h>
#include <algorithm>
#include <atomic>
#include <cassert>
#include <cstdint>
#include <cstring> // For std::memset and std::memcpy
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <initializer_list>
#include <iostream>
#include <list>
#include <mutex>
#include <sstream>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
#include "../bitboard.h"
#include "../misc.h"
#include "../movegen.h"
#include "../position.h"
#include "../search.h"
#include "../types.h"
#include "../uci.h"
#include "tbprobe.h"
#ifndef _WIN32
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
@@ -1002,7 +1007,7 @@ uint8_t* set_sizes(PairsData* d, uint8_t* data) {
// Starting from this we compute a base64[] table indexed by symbol length
// and containing 64 bit values so that d->base64[i] >= d->base64[i+1].
// Implementation note: we first cast the unsigned size_t "base64.size()"
// Implementation note: we first cast the unsigned size_t "base64.size()"
// to a signed int "base64_size" variable and then we are able to subtract 2,
// avoiding unsigned overflow warnings.