Skip to content

Commit f0f2b31

Browse files
committed
v2.3.3
1 parent f8105f6 commit f0f2b31

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

src/Hash.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Hash::Hash() {
3131
}
3232

3333
void Hash::clearAge() {
34-
for (int i = 0; i < HASH_SIZE; i++) {
34+
for (unsigned i = 0; i < HASH_SIZE; i++) {
3535
hashArray[HASH_ALWAYS][i].u.dataS.entryAge = 0;
3636
}
3737
}
@@ -44,14 +44,10 @@ void Hash::clearHash() {
4444
memset(static_cast<void*>(hashArray[HASH_ALWAYS]), 0, sizeof(_Thash) * HASH_SIZE);
4545
}
4646

47-
int Hash::getHashSize() const {
48-
return HASH_SIZE / (1024 * 1024 / (sizeof(_Thash) * 2));
49-
}
50-
5147
void Hash::setHashSize(int mb) {
5248
dispose();
5349
if (mb > 0) {
54-
int tmp = mb * 1024 * 1024 / (sizeof(_Thash) * 2);
50+
u64 tmp = (u64)mb * 1024 * 1024 / (sizeof(_Thash) * 2);
5551
hashArray[HASH_ALWAYS] = (_Thash *) calloc(tmp, sizeof(_Thash));
5652
if (!hashArray[HASH_ALWAYS]) {
5753
fatal("info string error - no memory");

src/Hash.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ class Hash : public Singleton<Hash> {
8080

8181
void setHashSize(int mb);
8282

83-
int getHashSize() const;
84-
8583
void clearHash();
8684

8785
void clearAge();
@@ -106,7 +104,7 @@ class Hash : public Singleton<Hash> {
106104

107105
void recordHash(const u64 zobristKey, _ThashData &tmp) {
108106
ASSERT(zobristKey);
109-
const int kMod = zobristKey % HASH_SIZE;
107+
const unsigned kMod = zobristKey % HASH_SIZE;
110108
_Thash *rootHashG = &(hashArray[HASH_ALWAYS][kMod]);
111109

112110
rootHashG->key = (zobristKey ^ tmp.dataU);
@@ -139,7 +137,7 @@ class Hash : public Singleton<Hash> {
139137

140138
private:
141139
Hash();
142-
int HASH_SIZE;
140+
unsigned HASH_SIZE;
143141
#ifdef JS_MODE
144142
static constexpr int HASH_SIZE_DEFAULT = 1;
145143
#else

src/Search.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,9 @@ int Search::search(int depth, int alpha, const int beta, _TpvLine *pline, const
945945
ASSERT(chessboard[KING_BLACK])
946946
ASSERT(chessboard[KING_WHITE])
947947

948-
// move->s.score1 = score;
949948
if (score > alpha) {
950949
if (score >= beta) {
951950
decListId();
952-
// ASSERT(move->s.score1 == score);
953951
INC(nCutAB);
954952
ADD(betaEfficiency, betaEfficiencyCount / (double) listcount * 100.0);
955953
if (getRunning()) {

src/namespaces/constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
using namespace std;
2727
namespace constants {
2828

29-
static const string NAME = "Cinnamon 2.3.2";
29+
static const string NAME = "Cinnamon 2.3.3";
3030
static const string STARTPOS = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
3131
static constexpr int BLACK = 0;
3232
static constexpr int WHITE = 1;

0 commit comments

Comments
 (0)