Remove redundant type casts

This commit is contained in:
Hamidreza Bayat 2019-04-28 19:44:32 +04:30
parent 708660958c
commit 490bacfce0
2 changed files with 5 additions and 5 deletions

View File

@ -150,7 +150,7 @@ public class TranspositionTable {
altEnt.move = ent.move;
altEnt.score = ent.score;
altEnt.depthSlot = ent.depthSlot;
altEnt.generation = (byte)ent.generation;
altEnt.generation = ent.generation;
altEnt.type = ent.type;
altEnt.setHashSlot(1 - ent.getHashSlot());
altEnt.evalScore = ent.evalScore;
@ -173,7 +173,7 @@ public class TranspositionTable {
ent.key = key;
ent.setScore(sm.score, ply);
ent.setDepth(depth);
ent.generation = (byte)generation;
ent.generation = generation;
ent.type = (byte)type;
ent.setHashSlot(hashSlot);
ent.evalScore = (short)evalScore;
@ -185,13 +185,13 @@ public class TranspositionTable {
int idx0 = h0(key);
TTEntry ent = table[idx0];
if (ent.key == key) {
ent.generation = (byte)generation;
ent.generation = generation;
return ent;
}
int idx1 = h1(key);
ent = table[idx1];
if (ent.key == key) {
ent.generation = (byte)generation;
ent.generation = generation;
return ent;
}
return emptySlot;

View File

@ -152,7 +152,7 @@ public final class TreeLogger {
* @return node index
*/
final long logNodeStart(long parentIndex, Move m, int alpha, int beta, int ply, int depth) {
bb.putInt ( 0, (int)-1);
bb.putInt ( 0, -1);
bb.putInt ( 4, (int)parentIndex);
bb.putShort( 8, (short)(m.from + (m.to << 6) + (m.promoteTo << 12)));
bb.putShort(10, (short)alpha);