Skip to content

Commit e87a159

Browse files
committed
Cleanup
1 parent bc235b1 commit e87a159

File tree

2 files changed

+47
-41
lines changed

2 files changed

+47
-41
lines changed

Sources/TimecodeKit/Timecode/SubFramesBase/SubFramesBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extension Timecode.SubFramesBase: Sendable { }
5454

5555
extension Timecode.SubFramesBase: Codable { }
5656

57-
// MARK: Methods
57+
// MARK: - Methods
5858

5959
extension Timecode.SubFramesBase {
6060
/// Converts a given number of subframes at this subframes base to a different subframes base.

Sources/TimecodeKit/Timecode/UpperLimit/UpperLimit.swift

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,13 @@
77
extension Timecode {
88
/// Enum describing the maximum timecode ceiling.
99
public enum UpperLimit: String, CaseIterable {
10+
/// 24-hour upper limit.
1011
/// Pro Tools' upper limit is "23:59:59:FF" inclusive, which is 1 day (24 hours) in duration.
1112
case max24Hours = "24 hours"
1213

14+
/// 100-day upper limit.
1315
/// Cubase's upper limit is "99 23:59:59:FF" inclusive, which is 100 days in duration.
1416
case max100Days = "100 days"
15-
16-
/// Internal use.
17-
var maxDays: Int {
18-
switch self {
19-
case .max24Hours: return 1
20-
case .max100Days: return 100
21-
}
22-
}
23-
24-
/// Internal use.
25-
var maxDaysExpressible: Int {
26-
switch self {
27-
case .max24Hours: return maxDays - 1
28-
case .max100Days: return maxDays - 1
29-
}
30-
}
31-
32-
/// Internal use.
33-
var maxHours: Int {
34-
switch self {
35-
case .max24Hours: return 24
36-
case .max100Days: return 24
37-
}
38-
}
39-
40-
/// Internal use.
41-
var maxHoursExpressible: Int {
42-
switch self {
43-
case .max24Hours: return maxHours - 1
44-
case .max100Days: return maxHours - 1
45-
}
46-
}
47-
48-
/// Internal use.
49-
var maxHoursTotal: Int {
50-
switch self {
51-
case .max24Hours: return maxHours - 1
52-
case .max100Days: return (maxHours * maxDays) - 1
53-
}
54-
}
5517
}
5618
}
5719

@@ -63,3 +25,47 @@ extension Timecode.UpperLimit: Codable { }
6325
extension Timecode.UpperLimit: Identifiable {
6426
public var id: Self { self }
6527
}
28+
29+
// MARK: - Methods
30+
31+
extension Timecode.UpperLimit {
32+
/// Internal use.
33+
var maxDays: Int {
34+
switch self {
35+
case .max24Hours: return 1
36+
case .max100Days: return 100
37+
}
38+
}
39+
40+
/// Internal use.
41+
var maxDaysExpressible: Int {
42+
switch self {
43+
case .max24Hours: return maxDays - 1
44+
case .max100Days: return maxDays - 1
45+
}
46+
}
47+
48+
/// Internal use.
49+
var maxHours: Int {
50+
switch self {
51+
case .max24Hours: return 24
52+
case .max100Days: return 24
53+
}
54+
}
55+
56+
/// Internal use.
57+
var maxHoursExpressible: Int {
58+
switch self {
59+
case .max24Hours: return maxHours - 1
60+
case .max100Days: return maxHours - 1
61+
}
62+
}
63+
64+
/// Internal use.
65+
var maxHoursTotal: Int {
66+
switch self {
67+
case .max24Hours: return maxHours - 1
68+
case .max100Days: return (maxHours * maxDays) - 1
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)