Move deepness level to constant variable.

This commit is contained in:
2026-01-19 17:16:33 -08:00
parent ff63e31f4c
commit 5d0247fcaf

View File

@@ -1,5 +1,7 @@
import AppKit import AppKit
fileprivate let INDEX_DEEPNESS = 2
struct Program { struct Program {
var path: String = "" var path: String = ""
var name: String = "" var name: String = ""
@@ -106,7 +108,7 @@ final class PathManager {
// allocations. // allocations.
public func rebuildIndex(at path: String) { public func rebuildIndex(at path: String) {
paths[path] = [] paths[path] = []
paths[path] = indexDirs(at: path, deepness: 2) paths[path] = indexDirs(at: path, deepness: INDEX_DEEPNESS)
} }
public func indexDirs(at path: String, deepness: Int) -> [Program] { public func indexDirs(at path: String, deepness: Int) -> [Program] {