Skip to content

Commit

Permalink
Fix errors and warnings when building for Swift 3.2 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyTaylor authored and p2 committed Sep 27, 2017
1 parent 3032da9 commit d19cd58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ See [tags/releases](https://github.com/smart-on-fhir/Swift-FHIR/releases).

Version | Swift | FHIR |  
---------|-----------|---------------|-----------------------------
**3.1**| 3.2 | `3.0.0.11832` | STU 3
**3.0** | 3.0 | `3.0.0.11832` | STU 3
**2.10** | 3.0 | `1.8.0.10521` | STU 3 Freeze, Jan 2017
**2.9** | 3.0 | `1.6.0.9663` | STU 3 Ballot, Sep 2016
Expand Down
2 changes: 1 addition & 1 deletion Sources/Client/Element+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public extension FHIRPrimitive {

- parameter forURI: The URI defining the extension on the receiver
*/
public final func extensions(forURI uri: String) -> [Extension]? {
public func extensions(forURI uri: String) -> [Extension]? {
return extension_fhir?.filter() { return $0.url?.absoluteString == uri }
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Models/DateAndTime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Foundation
/**
A protocol for all our date and time structs.
*/
protocol DateAndTime: FHIRPrimitive, CustomStringConvertible, Comparable, Equatable {
protocol DateAndTime: FHIRPrimitive, CustomStringConvertible, Comparable {

var nsDate: Date { get }

Expand Down Expand Up @@ -340,9 +340,9 @@ public struct FHIRTime: DateAndTime {
}
if let s = second {
#if os(Linux)
return String(format: "%02d:%02d:", hour, minute) + ((s < 10) ? "0" : "") + String(format: "%g", s)
return String(format: "%02d:%02d:", hour, minute) + ((s < 10.0) ? "0" : "") + String(format: "%g", s)
#else
return String(format: "%02d:%02d:%@%g", hour, minute, (s < 10) ? "0" : "", s)
return String(format: "%02d:%02d:%@%g", hour, minute, (s < 10.0) ? "0" : "", s)
#endif
}
return String(format: "%02d:%02d", hour, minute)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Models/FHIRType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extension FHIRJSONType {
- parameter json: The JSON element to use to populate the receiver
- parameter context: An in-out parameter being filled with key names used.
*/
public final func populateAndFinalize(from json: FHIRJSON, context: inout FHIRInstantiationContext) {
public func populateAndFinalize(from json: FHIRJSON, context: inout FHIRInstantiationContext) {
context.insertKey("fhir_comments")
populate(from: json, context: &context)

Expand Down

0 comments on commit d19cd58

Please sign in to comment.