Skip to content

Commit e90ed1d

Browse files
committed
✨ Fix compiler warnings
1 parent c5cf0e1 commit e90ed1d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Loop/Private APIs/SkyLightToolBelt.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ enum SkyLightToolBelt {
2121
return false
2222
}
2323

24-
var wid = windowID
2524
var psn = ProcessSerialNumber()
2625
let status = GetProcessForPID(pid, &psn)
2726

28-
var cgStatus = SLPSSetFrontProcessWithOptions(
27+
guard status == noErr else {
28+
Log.error("Failed to get PSN: \(status)", category: .skyLightToolBelt)
29+
return false
30+
}
31+
32+
let cgStatus = SLPSSetFrontProcessWithOptions(
2933
&psn,
30-
wid,
34+
windowID,
3135
kCPSUserGenerated
3236
)
3337

0 commit comments

Comments
 (0)