sort uid exception list in a smarter place

do it closer to where it is populated. that way the debug output is
sorted, and we don't sort the list if it's known to be empty.
This commit is contained in:
Oswald Buddenhagen 2017-01-29 15:00:00 +01:00
parent 72be55b0e3
commit 990c8a1404

View File

@ -1301,6 +1301,7 @@ box_opened2( sync_vars_t *svars, int t )
*int_array_append( &mexcs ) = srec->uid[M]; *int_array_append( &mexcs ) = srec->uid[M];
} }
} }
sort_int_array( mexcs.array );
debugn( " exception list is:" ); debugn( " exception list is:" );
for (t = 0; t < mexcs.array.size; t++) for (t = 0; t < mexcs.array.size; t++)
debugn( " %d", mexcs.array.data[t] ); debugn( " %d", mexcs.array.data[t] );
@ -1312,7 +1313,6 @@ box_opened2( sync_vars_t *svars, int t )
minwuid = INT_MAX; minwuid = INT_MAX;
} }
sync_ref( svars ); sync_ref( svars );
sort_int_array( mexcs.array );
load_box( svars, M, minwuid, mexcs.array ); load_box( svars, M, minwuid, mexcs.array );
if (!check_cancel( svars )) if (!check_cancel( svars ))
load_box( svars, S, (ctx[S]->opts & OPEN_OLD) ? 1 : INT_MAX, (int_array_t){ 0, 0 } ); load_box( svars, S, (ctx[S]->opts & OPEN_OLD) ? 1 : INT_MAX, (int_array_t){ 0, 0 } );