Skip to content

Commit

Permalink
Merge pull request #74 from orchetect/dev
Browse files Browse the repository at this point in the history
`MIDI.Note`: disfavored failable init
  • Loading branch information
orchetect authored Mar 3, 2022
2 parents 48a6816 + 616830b commit 18ae88e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/MIDIKit/Note/MIDI Note.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public extension MIDI {

/// Construct from a MIDI note number.
/// Returns `nil` if note number is invalid.
@_disfavoredOverload
public init?<T: BinaryInteger>(_ number: T) {

guard let uint7 = MIDI.UInt7(exactly: number) else { return nil }
Expand Down

0 comments on commit 18ae88e

Please sign in to comment.