File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -218,13 +218,11 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
218
218
const scanBlossom = function ( v , w ) {
219
219
console . debug ( 'DEBUG: scanBlossom(' + v + ',' + w + ')' ) ;
220
220
// Trace back from v and w, placing breadcrumbs as we go.
221
- let b ;
222
- let i ;
223
221
const path = [ ] ;
224
222
let base = - 1 ;
225
223
while ( v !== - 1 || w !== - 1 ) {
226
224
// Look for a breadcrumb in v's blossom or put a new breadcrumb.
227
- b = inblossom [ v ] ;
225
+ let b = inblossom [ v ] ;
228
226
if ( label [ b ] & 4 ) {
229
227
base = blossombase [ b ] ;
230
228
break ;
@@ -256,11 +254,7 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
256
254
}
257
255
258
256
// Remove breadcrumbs.
259
- i = path . length ;
260
- while ( i -- ) {
261
- b = path [ i ] ;
262
- label [ b ] = 1 ;
263
- }
257
+ for ( const b of path ) label [ b ] = 1 ;
264
258
265
259
// Return base vertex, if we found one.
266
260
return base ;
You can’t perform that action at this time.
0 commit comments