Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix variable name to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
cuba committed Oct 19, 2023
1 parent 76c8e6c commit a77a31a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import os.log
public actor AdBlockStats {
/// The max number of enabled filter lists depending on the amount memory available to the device
static var maxNumberOfAllowedFilterLists: Int = {
let memory = Int(ProcessInfo.processInfo.physicalMemory / 1073741824)
ContentBlockerManager.log.debug("Memory: \(memory)")
return max(min(5 * memory, 40), 20)
let numberOfGigs = Int(ProcessInfo.processInfo.physicalMemory / 1073741824)
ContentBlockerManager.log.debug("Memory: \(numberOfGigs)")
// Take a value between 20 and 40,
// with the real value somewhere in the middle depending on the device's memory
return max(min(5 * numberOfGigs, 40), 20)
}()

typealias CosmeticFilterModelTuple = (isAlwaysAggressive: Bool, model: CosmeticFilterModel)
Expand Down

0 comments on commit a77a31a

Please sign in to comment.