Skip to content

Commit

Permalink
Make functions public
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr. Brandon Wiley committed Aug 19, 2019
1 parent 47a31b9 commit 5f132b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Sources/Song/Decoding/SongDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SongDecoder {
userInfo=[:]
}

func decode<T>(_ type: [T].Type, from data: Data) throws -> [T] where T : Decodable {
public func decode<T>(_ type: [T].Type, from data: Data) throws -> [T] where T : Decodable {
NSLog("ARRAY DECODE CHOSEN")
NSLog("decode<T> data: \(data as NSData)")
self.data=data
Expand Down Expand Up @@ -185,7 +185,7 @@ public class SongDecoder {
}
}

func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable
public func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable
{
NSLog("decode<T> data: \(data as NSData)")
self.data=data
Expand Down Expand Up @@ -245,7 +245,7 @@ public class SongDecoder {
}
}

func singleType<T>(_ type: T.Type) -> Bool {
public func singleType<T>(_ type: T.Type) -> Bool {
if type == String.self {
return true
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Song/Encoding/SongEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SongEncoder {
userInfo=[:]
}

func encode<Key, Value>(_ value: [Key: Value]) throws -> Data where Key : Encodable & CodingKey, Value : Encodable {
public func encode<Key, Value>(_ value: [Key: Value]) throws -> Data where Key : Encodable & CodingKey, Value : Encodable {
let map = _container(keyedBy: Key.self)
for (key, val) in value {
do {
Expand All @@ -37,7 +37,7 @@ public class SongEncoder {
return map.data!
}

func encode<Value>(_ value: [Value]) throws -> Data where Value : Encodable {
public func encode<Value>(_ value: [Value]) throws -> Data where Value : Encodable {
if let ints = value as? [Int] {
let list = self._unkeyedContainer()
do {
Expand Down Expand Up @@ -113,7 +113,7 @@ public class SongEncoder {
}
}

func encode<Value>(_ value: Value) throws -> Data where Value : Encodable {
public func encode<Value>(_ value: Value) throws -> Data where Value : Encodable {
switch value {
// case is Dictionary<K: Hashable, Any>:
// break
Expand Down

0 comments on commit 5f132b5

Please sign in to comment.