Skip to content

Commit 429b634

Browse files
authored
Merge pull request #8 from orchetect/tcc-totimecoderawvalues-optional-fix
Fixed TCC.toTimecode(rawValuesAt:) to not return Optional
2 parents ca13e3e + 68eedf7 commit 429b634

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
<img src="http://img.shields.io/badge/license-MIT-blue.svg?style=flat"
1818
alt="License: MIT" /></a>
1919
</p>
20-
21-
2220
A robust multiplatform Swift library for working with SMPTE timecode supporting 20 industry frame rates, and including methods to convert to/from timecode strings and perform calculations.
2321

2422
## Supported Frame Rates

Sources/TimecodeKit/Components/Components.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extension Timecode.Components {
104104
/// Returns an instance of `Timecode(rawValues:)`.
105105
public func toTimecode(rawValuesAt frameRate: Timecode.FrameRate,
106106
limit: Timecode.UpperLimit = ._24hours,
107-
subFramesDivisor: Int? = nil) -> Timecode?
107+
subFramesDivisor: Int? = nil) -> Timecode
108108
{
109109

110110
if let sfd = subFramesDivisor {

Sources/TimecodeKit/Timecode String Extensions.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ extension String {
2222
if let sfd = subFramesDivisor {
2323

2424
return Timecode(self,
25-
at: frameRate,
26-
limit: limit,
27-
subFramesDivisor: sfd)
25+
at: frameRate,
26+
limit: limit,
27+
subFramesDivisor: sfd)
2828

2929
} else {
3030

3131
return Timecode(self,
32-
at: frameRate,
33-
limit: limit)
32+
at: frameRate,
33+
limit: limit)
3434

3535
}
3636

@@ -46,15 +46,15 @@ extension String {
4646
if let sfd = subFramesDivisor {
4747

4848
return Timecode(rawValues: self,
49-
at: frameRate,
50-
limit: limit,
51-
subFramesDivisor: sfd)
49+
at: frameRate,
50+
limit: limit,
51+
subFramesDivisor: sfd)
5252

5353
} else {
5454

5555
return Timecode(rawValues: self,
56-
at: frameRate,
57-
limit: limit)
56+
at: frameRate,
57+
limit: limit)
5858

5959
}
6060

0 commit comments

Comments
 (0)