Remove some duplicated code.

This commit is contained in:
Damiano Galassi committed 2020-02-11 17:07:02 +01:00
1 parent 3200666b73
commit f4ac5c0262
4 files changed
+72 -80

No files matched your search

@@ -22,7 +22,7 @@ private class MediaTag {
/// for a particular media type.
///
/// - Parameter mediaType: a MP42MediaType type.
/// - Returns: an array of NSString with the supported tags.
/// - Returns: an array of String with the supported tags.
static func predefinedTags(for mediaType: MP42MediaType) -> [String] {
var tags = ["public.main-program-content", "public.auxiliary-content"]
@@ -586,7 +586,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
// MARK: Table View editing
private func stringsArray(fromString string: NSString) -> [String] {
private func stringsArray(fromString string: String) -> [String] {
let splitElements = ",\\s*+"
return string.mp42_components(separatedByRegex: splitElements)
}
@@ -633,7 +633,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
}
case .stringArray:
value = stringsArray(fromString: sender.stringValue as NSString)
value = stringsArray(fromString: sender.stringValue)
break
case .integer: