Shlomi Fish avatar Shlomi Fish committed 29793dd

Revert "Add and require SET_VACANT_PTR()."

This reverts commit ac4302b28c22e9a57a4040e93b64bb8439ca0487.

Comments (0)

Files changed (3)

fc-solve/source/freecell.c

     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     int initial_derived_states_num_states = derived_states_list->num_states;
 #if ((!defined(HARD_CODED_NUM_FREECELLS)) || (!defined(HARD_CODED_NUM_STACKS)))
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     /* Now let's check if a card that is under some other cards can be placed
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     /*
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     const int initial_derived_states_num_states =
 #if ((!defined(HARD_CODED_NUM_FREECELLS)) || (!defined(HARD_CODED_NUM_STACKS)))
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     const int max_sequence_len = calc_max_sequence_move(num_vacant_freecells, num_vacant_stacks-1);
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     if (num_vacant_stacks)
 #if ((!defined(HARD_CODED_NUM_FREECELLS)) || (!defined(HARD_CODED_NUM_STACKS)) || (!defined(HARD_CODED_NUM_DECKS)))
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     const int initial_derived_states_num_states = derived_states_list->num_states;
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS_AND_STACKS();
 
     /* Now, let's try to empty an entire stack into the freecells, so other cards can
         return;
     }
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     if (num_vacant_stacks == 0)
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_FREECELLS();
 
     if (num_vacant_freecells == 0)
         return;
     }
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     if (num_vacant_stacks == 0)

fc-solve/source/meta_move_funcs_helpers.h

  * */
 #define tests__should_not_empty_columns() tests__is_filled_by_none()
 
-#define SET_VACANT_PTR() \
-    const fcs_vacant_state_resources_info_t * const \
-        vacant_state_resources_ptr = \
-            soft_thread->vacant_state_resources_ptr;
-
-/* Requires adding a SET_VACANT_PTR() before it. */
 #define SET_VACANT_FREECELLS() \
     const fcs_game_limit_t num_vacant_freecells = \
-        vacant_state_resources_ptr->num_vacant_freecells;
+        soft_thread->vacant_state_resources_ptr->num_vacant_freecells;
 
-/* Requires adding a SET_VACANT_PTR() before it. */
 #define SET_VACANT_STACKS() \
     const fcs_game_limit_t num_vacant_stacks = \
-        vacant_state_resources_ptr->num_vacant_stacks;
+        soft_thread->vacant_state_resources_ptr->num_vacant_stacks;
 
 #define SET_VACANT_FREECELLS_AND_STACKS() \
     SET_VACANT_FREECELLS(); \

fc-solve/source/simpsim.c

     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
 #ifndef HARD_CODED_NUM_STACKS
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
     SET_GAME_PARAMS();
 #endif
 
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
 #ifndef HARD_CODED_NUM_STACKS
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
 #ifndef HARD_CODED_NUM_STACKS
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0;stack_idx<LOCAL_STACKS_NUM;stack_idx++)
 #ifndef HARD_CODED_NUM_STACKS
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0 ; stack_idx < LOCAL_STACKS_NUM ; stack_idx++)
 #ifndef HARD_CODED_NUM_STACKS
     SET_GAME_PARAMS();
 #endif
-    SET_VACANT_PTR();
     SET_VACANT_STACKS();
 
     for(stack_idx=0 ; stack_idx < LOCAL_STACKS_NUM ; stack_idx++)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.