-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UTGetOSTypeFromStringがDeprecatedだったのでOSTypeで取得できるように修正した
- Loading branch information
Showing
5 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ey/NSEvent.ModifierFlags+Extensions.swift → ...Key/NSEvent.ModifierFlags+Extension.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
String+Extension.swift | ||
|
||
|
||
Created by Takuto Nakamura on 2024/02/29. | ||
*/ | ||
|
||
import Foundation | ||
|
||
extension OSType: ExpressibleByStringLiteral { | ||
public init(stringLiteral: StringLiteralType) { | ||
if let data = stringLiteral.data(using: .macOSRoman) { | ||
self.init(data.reduce(0, { ($0 << 8) + Self($1) })) | ||
} else { | ||
self.init(0) | ||
} | ||
} | ||
} |