mirror of https://github.com/gorhill/uBlock.git
Minor code review
This commit is contained in:
parent
3a5606125d
commit
f15dff27fe
|
@ -2643,7 +2643,8 @@ class FilterBucket extends FilterCollection {
|
|||
}
|
||||
|
||||
static optimize(idata, optimizeBits = 0b11) {
|
||||
if ( filterData[idata+2] >= 3 && (optimizeBits & 0b01) !== 0 ) {
|
||||
if ( (optimizeBits & 0b01) !== 0 ) {
|
||||
if ( filterData[idata+2] >= 3 ) {
|
||||
const iplaintrie = this.optimizePatternTests(idata);
|
||||
if ( iplaintrie !== 0 ) {
|
||||
const icollection = filterData[idata+1];
|
||||
|
@ -2652,7 +2653,9 @@ class FilterBucket extends FilterCollection {
|
|||
this.unshift(idata, iplaintrie);
|
||||
}
|
||||
}
|
||||
if ( filterData[idata+2] >= 5 && (optimizeBits & 0b10) !== 0 ) {
|
||||
}
|
||||
if ( (optimizeBits & 0b10) !== 0 ) {
|
||||
if ( filterData[idata+2] >= 5 ) {
|
||||
const ioptimized = this.optimizeMatch(
|
||||
idata,
|
||||
FilterBucketIfOriginHits,
|
||||
|
@ -2665,7 +2668,7 @@ class FilterBucket extends FilterCollection {
|
|||
this.unshift(idata, ioptimized);
|
||||
}
|
||||
}
|
||||
if ( filterData[idata+2] >= 5 && (optimizeBits & 0b10) !== 0 ) {
|
||||
if ( filterData[idata+2] >= 5 ) {
|
||||
const ioptimized = this.optimizeMatch(
|
||||
idata,
|
||||
FilterBucketIfRegexHits,
|
||||
|
@ -2678,6 +2681,7 @@ class FilterBucket extends FilterCollection {
|
|||
this.unshift(idata, ioptimized);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue