mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
Remove redundant type casts
This commit is contained in:
parent
708660958c
commit
490bacfce0
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user