Skip to content

Commit

Permalink
mac: code consistency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Akemi committed Feb 21, 2024
1 parent 834a169 commit 64c1f85
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions osdep/macos/swift_extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extension NSDeviceDescriptionKey {
}

extension NSScreen {

public var displayID: CGDirectDisplayID {
get {
return deviceDescription[.screenNumber] as? CGDirectDisplayID ?? 0
Expand All @@ -31,7 +30,6 @@ extension NSScreen {
}

extension NSColor {

convenience init(hex: String) {
let int = Int(hex.dropFirst(), radix: 16) ?? 0
let alpha = CGFloat((int >> 24) & 0x000000FF)/255
Expand All @@ -44,14 +42,12 @@ extension NSColor {
}

extension Bool {

init(_ int32: Int32) {
self.init(int32 != 0)
}
}

extension Int32 {

init(_ bool: Bool) {
self.init(bool ? 1 : 0)
}
Expand Down

0 comments on commit 64c1f85

Please sign in to comment.