aboutsummaryrefslogtreecommitdiff
path: root/Sources/source_manager.swift
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2017-05-18 23:39:25 -0500
committerBen Beltran <ben@nsovocal.com>2017-05-18 23:39:25 -0500
commit1263f62c5c6379f11e19eb184ffedf5889390b70 (patch)
treef594221e77f5a6163ed96ad1c56556240ec8ea86 /Sources/source_manager.swift
parent6608973cc785af2363b71299e03407e5dd436f54 (diff)
Fix linter warnings
Diffstat (limited to 'Sources/source_manager.swift')
-rw-r--r--Sources/source_manager.swift29
1 files changed, 12 insertions, 17 deletions
diff --git a/Sources/source_manager.swift b/Sources/source_manager.swift
index dd956ad..e55cc8b 100644
--- a/Sources/source_manager.swift
+++ b/Sources/source_manager.swift
@@ -6,16 +6,13 @@ class SourceManager {
]
var currentTrack: Track? {
- get {
-
- for source in enabledSources {
- if let currentTrack = source.currentTrack {
- return currentTrack
- }
+ for source in enabledSources {
+ if let currentTrack = source.currentTrack {
+ return currentTrack
}
-
- return nil
}
+
+ return nil
}
var enabledSources: [Source] {
@@ -23,19 +20,17 @@ class SourceManager {
// Checks the config and returns an array of sources based on the
// enabled and available ones
- get {
- var sources = [Source]()
+ var sources = [Source]()
- if let sourceNames = Configuration.sharedInstance["enabled_sources"] as? [String]{
- for sourceName in sourceNames {
- if let source = availableSources[sourceName] {
- sources.append(source)
- }
+ if let sourceNames = Configuration.sharedInstance["enabled_sources"] as? [String] {
+ for sourceName in sourceNames {
+ if let source = availableSources[sourceName] {
+ sources.append(source)
}
}
-
- return sources
}
+
+ return sources
}
func enable(sourceName: String) {