Reorder conditions according to their frequency
authorMarco Costalba <mcostalba@gmail.com>
Sun, 30 Jun 2013 09:35:03 +0000 (11:35 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 30 Jun 2013 09:35:53 +0000 (11:35 +0200)
This should minimize useless tests.

No functional change.

src/search.cpp

index 15981755b432fd3329760ba6af7b01065b5fd33f..7b7bc5cd8ec00b4b4b2f056046c8560eabf25408 100644 (file)
@@ -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);