From 92dcbfa658a66ccc633ff24dd3402f90451712ed Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 30 Jun 2013 11:35:03 +0200 Subject: [PATCH] Reorder conditions according to their frequency This should minimize useless tests. No functional change. --- src/search.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 15981755..7b7bc5cd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -614,10 +614,10 @@ namespace { // Update gain for the parent non-capture move given the static position // evaluation before and after the move. - if ( (move = (ss-1)->currentMove) != MOVE_NULL - && (ss-1)->staticEval != VALUE_NONE + if ( !pos.captured_piece_type() && ss->staticEval != VALUE_NONE - && !pos.captured_piece_type() + && (ss-1)->staticEval != VALUE_NONE + && (move = (ss-1)->currentMove) != MOVE_NULL && type_of(move) == NORMAL) { Square to = to_sq(move); -- 2.39.2