@@ -1061,13 +1061,13 @@ impl ThorHash {
10611061 FILTER_DATABASE
10621062 Applies the current filter rules to the database DB.
10631063*/
1064- fn filter_database ( db : & mut DatabaseType , tournaments_ : & [ TournamentType ] , players_ : & [ PlayerType ] , filter_ : & FilterType ) {
1064+ fn filter_database ( db : & DatabaseType , tournaments_ : & [ TournamentType ] , players_ : & [ PlayerType ] , filter_ : & FilterType ) {
10651065 let mut category: i32 = 0 ;
10661066 let mut passes_filter: i32 = 0 ;
10671067 let mut year: i32 = 0 ;
10681068 let mut i = 0 ;
10691069 while i < ( * db) . count {
1070- let game = ( * db) . games . offset ( i as isize ) ;
1070+ let game = ( * db) . games . as_slice ( ) . offset ( i as isize ) ;
10711071 passes_filter = 1 ;
10721072 /* Apply the tournament filter */
10731073 if passes_filter != 0 && ( * tournaments_. offset ( ( * game) . tournament_no as isize ) ) . selected == 0 {
@@ -1115,7 +1115,7 @@ fn filter_database(db: &mut DatabaseType, tournaments_: &[TournamentType], playe
11151115 }
11161116 passes_filter = category & filter_. game_categories
11171117 }
1118- ( * game) . passes_filter = passes_filter as i16 ;
1118+ ( * game) . passes_filter . set ( passes_filter as i16 ) ;
11191119 i += 1
11201120 } ;
11211121}
@@ -2437,7 +2437,7 @@ pub unsafe fn database_search(in_board: &[i32], side_to_move: i32) {
24372437 i = 0 ;
24382438 while i < ( * current_db) . count {
24392439 let game = ( * current_db) . games . as_slice ( ) . offset ( i as isize ) ;
2440- if ( * game) . passes_filter != 0 {
2440+ if ( * game) . passes_filter . get ( ) != 0 {
24412441 if disc_count[ 0 ] == ( * game) . black_disc_count [ move_count as usize ] as i32 {
24422442 if position_match ( game, & mut board, & mut thor_hash, & mut thor_opening_tree, move_count, side_to_move, & mut shape_lo, & mut shape_hi, corner_mask, target_hash1, target_hash2) != 0 {
24432443 let ref mut fresh7 = * thor_search. match_list . offset ( game. sort_order . get ( ) as _ ) ;
0 commit comments