@@ -1061,13 +1061,13 @@ impl ThorHash {
1061
1061
FILTER_DATABASE
1062
1062
Applies the current filter rules to the database DB.
1063
1063
*/
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 ) {
1065
1065
let mut category: i32 = 0 ;
1066
1066
let mut passes_filter: i32 = 0 ;
1067
1067
let mut year: i32 = 0 ;
1068
1068
let mut i = 0 ;
1069
1069
while i < ( * db) . count {
1070
- let game = ( * db) . games . offset ( i as isize ) ;
1070
+ let game = ( * db) . games . as_slice ( ) . offset ( i as isize ) ;
1071
1071
passes_filter = 1 ;
1072
1072
/* Apply the tournament filter */
1073
1073
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
1115
1115
}
1116
1116
passes_filter = category & filter_. game_categories
1117
1117
}
1118
- ( * game) . passes_filter = passes_filter as i16 ;
1118
+ ( * game) . passes_filter . set ( passes_filter as i16 ) ;
1119
1119
i += 1
1120
1120
} ;
1121
1121
}
@@ -2437,7 +2437,7 @@ pub unsafe fn database_search(in_board: &[i32], side_to_move: i32) {
2437
2437
i = 0 ;
2438
2438
while i < ( * current_db) . count {
2439
2439
let game = ( * current_db) . games . as_slice ( ) . offset ( i as isize ) ;
2440
- if ( * game) . passes_filter != 0 {
2440
+ if ( * game) . passes_filter . get ( ) != 0 {
2441
2441
if disc_count[ 0 ] == ( * game) . black_disc_count [ move_count as usize ] as i32 {
2442
2442
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 {
2443
2443
let ref mut fresh7 = * thor_search. match_list . offset ( game. sort_order . get ( ) as _ ) ;
0 commit comments