Skip to content

Commit 4603fcc

Browse files
authored
De-label value arguments (#163)
1 parent 3c4a5c6 commit 4603fcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+100
-87
lines changed

Sources/MusicXML/Complex Types/AccidentalMark.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct AccidentalMark {
1919
public var position: Position?
2020
public var printStyle: PrintStyle?
2121

22-
public init(value: AccidentalValue, placement: AboveBelow? = nil, position: Position? = nil, printStyle: PrintStyle? = nil) {
22+
public init(_ value: AccidentalValue, placement: AboveBelow? = nil, position: Position? = nil, printStyle: PrintStyle? = nil) {
2323
self.value = value
2424
self.placement = placement
2525
self.position = position

Sources/MusicXML/Complex Types/AccidentalText.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,22 @@ public struct AccidentalText {
2525
// MARK: - Elements
2626
public let value: AccidentalValue
2727

28-
public init(justify: LeftCenterRight? = nil, printStyle: PrintStyle = PrintStyle(), hAlign: LeftCenterRight? = nil, vAlign: VAlign? = nil, underline: Int? = nil, overline: Int? = nil, lineThrough: Int? = nil, rotation: Double? = nil, letterSpacing: NumberOrNormal? = nil, lineHeight: NumberOrNormal? = nil, direction: TextDirection? = nil, enclosure: EnclosureShape? = nil, value: AccidentalValue) {
28+
public init(
29+
_ value: AccidentalValue,
30+
justify: LeftCenterRight? = nil,
31+
printStyle: PrintStyle = PrintStyle(),
32+
hAlign: LeftCenterRight? = nil,
33+
vAlign: VAlign? = nil,
34+
underline: Int? = nil,
35+
overline: Int? = nil,
36+
lineThrough: Int? = nil,
37+
rotation: Double? = nil,
38+
letterSpacing: NumberOrNormal? = nil,
39+
lineHeight: NumberOrNormal? = nil,
40+
direction: TextDirection? = nil,
41+
enclosure: EnclosureShape? = nil
42+
) {
43+
self.value = value
2944
self.justify = justify
3045
self.printStyle = printStyle
3146
self.hAlign = hAlign
@@ -38,7 +53,6 @@ public struct AccidentalText {
3853
self.lineHeight = lineHeight
3954
self.direction = direction
4055
self.enclosure = enclosure
41-
self.value = value
4256
}
4357
}
4458

Sources/MusicXML/Complex Types/BassAlter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct BassAlter {
1313
public let printStyle: PrintStyle?
1414
public let location: LeftRight?
1515

16-
public init(value: Double, printObject: Bool? = nil, printStyle: PrintStyle = PrintStyle(), location: LeftRight? = nil) {
16+
public init(_ value: Double, printObject: Bool? = nil, printStyle: PrintStyle = PrintStyle(), location: LeftRight? = nil) {
1717
self.value = value
1818
self.printObject = printObject
1919
self.printStyle = printStyle
@@ -40,6 +40,6 @@ extension BassAlter: Codable {
4040

4141
extension BassAlter: ExpressibleByFloatLiteral {
4242
public init(floatLiteral value: Double) {
43-
self.init(value: value)
43+
self.init(value)
4444
}
4545
}

Sources/MusicXML/Complex Types/Beam.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct Beam {
1818
public var fan: Fan?
1919
public var color: Color?
2020

21-
public init(value: BeamValue, number: BeamLevel? = nil, repeater: Bool? = nil, fan: Fan? = nil, color: Color? = nil) {
21+
public init(_ value: BeamValue, number: BeamLevel? = nil, repeater: Bool? = nil, fan: Fan? = nil, color: Color? = nil) {
2222
self.value = value
2323
self.number = number
2424
self.repeater = repeater

Sources/MusicXML/Complex Types/Beater.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public struct Beater {
99
public let value: BeaterValue
1010
public let tip: TipDirection?
1111

12-
public init(value: BeaterValue, tip: TipDirection? = nil) {
12+
public init(_ value: BeaterValue, tip: TipDirection? = nil) {
1313
self.value = value
1414
self.tip = tip
1515
}

Sources/MusicXML/Complex Types/Creator.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ public struct Creator {
2323
self.value = value
2424
self.type = type
2525
}
26-
27-
public init(value: String, type: String? = nil) {
28-
self.value = value
29-
self.type = type
30-
}
3126
}
3227

3328
extension Creator: Equatable { }

Sources/MusicXML/Complex Types/Distance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public struct Distance {
1010
public let value: Tenths
1111
public let type: DistanceType
1212

13-
public init(value: Tenths, type: DistanceType) {
13+
public init(_ value: Tenths, type: DistanceType) {
1414
self.value = value
1515
self.type = type
1616
}

Sources/MusicXML/Complex Types/Feature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct Feature {
1212
public let value: String
1313
public let type: String?
1414

15-
public init(value: String, type: String? = nil) {
15+
public init(_ value: String, type: String? = nil) {
1616
self.value = value
1717
self.type = type
1818
}

Sources/MusicXML/Complex Types/Fermata.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct Fermata {
1818
public var type: UprightInverted?
1919
public var printStyle: PrintStyle?
2020

21-
public init(value: FermataShape, type: UprightInverted? = nil, printStyle: PrintStyle? = nil) {
21+
public init(_ value: FermataShape, type: UprightInverted? = nil, printStyle: PrintStyle? = nil) {
2222
self.value = value
2323
self.type = type
2424
self.printStyle = printStyle

Sources/MusicXML/Complex Types/FirstFret.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct FirstFret {
1212
public let text: String?
1313
public let location: LeftRight?
1414

15-
public init(value: Int, text: String? = nil, location: LeftRight? = nil) {
15+
public init(_ value: Int, text: String? = nil, location: LeftRight? = nil) {
1616
self.value = value
1717
self.text = text
1818
self.location = location

0 commit comments

Comments
 (0)