mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Fix a compile issue with mingw 5.3
This commit is contained in:
parent
9cf110a2ae
commit
bfa2d923a7
1 changed files with 7 additions and 12 deletions
|
@ -68,11 +68,7 @@ struct PairsData {
|
|||
std::vector<uint8_t> symlen;
|
||||
};
|
||||
|
||||
class WDLEntry {
|
||||
|
||||
static constexpr uint8_t TB_MAGIC[] = { 0x71, 0xE8, 0x23, 0x5D };
|
||||
|
||||
public:
|
||||
struct WDLEntry {
|
||||
WDLEntry(const Position& pos, Key keys[]);
|
||||
~WDLEntry();
|
||||
bool init(const std::string& fname);
|
||||
|
@ -105,11 +101,7 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
class DTZEntry {
|
||||
|
||||
static constexpr uint8_t TB_MAGIC[] = { 0xD7, 0x66, 0x0C, 0xA5 };
|
||||
|
||||
public:
|
||||
struct DTZEntry {
|
||||
DTZEntry(const WDLEntry& wdl, Key keys[]);
|
||||
~DTZEntry();
|
||||
bool init(const std::string& fname);
|
||||
|
@ -325,6 +317,9 @@ const short KK_idx[10][64] = {
|
|||
}
|
||||
};
|
||||
|
||||
const uint8_t WDL_MAGIC[] = { 0x71, 0xE8, 0x23, 0x5D };
|
||||
const uint8_t DTZ_MAGIC[] = { 0xD7, 0x66, 0x0C, 0xA5 };
|
||||
|
||||
const int wdl_to_dtz[] = { -1, -101, 0, 101, 1 };
|
||||
const int wdl_to_map[] = { 1, 3, 0, 2, 0 };
|
||||
const uint8_t pa_flags[] = { 8, 0, 0, 0, 4 };
|
||||
|
@ -936,7 +931,7 @@ bool WDLEntry::init(const std::string& fname)
|
|||
uint64_t size[8 * 3];
|
||||
uint8_t flags;
|
||||
|
||||
uint8_t* data = TBFile(fname).map(&baseAddress, &mapping, TB_MAGIC);
|
||||
uint8_t* data = TBFile(fname).map(&baseAddress, &mapping, WDL_MAGIC);
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
|
@ -1075,7 +1070,7 @@ bool DTZEntry::init(const std::string& fname)
|
|||
uint64_t tb_size[4];
|
||||
uint64_t size[4 * 3];
|
||||
|
||||
uint8_t* data = TBFile(fname).map(&baseAddress, &mapping, TB_MAGIC);
|
||||
uint8_t* data = TBFile(fname).map(&baseAddress, &mapping, DTZ_MAGIC);
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue