         var result = [UInt8]()
         result.reserveCapacity(20)
 
-        var stringMap = Dictionary<String, [UInt8]>(minimumCapacity: self.numberOfStringEntries())
+        var stringMap = Dictionary<String, [UInt8]>(minimumCapacity: self.numberOfStringEntries)
 
         self.writeToBuffer(&result, stringMap: &stringMap)
         return result

}

private extension CoderTreeValue {
    func numberOfStringEntries() -> Int {
        switch self {
        case .StringValue, .NSURLValue:
            return 1

private func stringEntriesCount(array: [CoderTreeValue]) -> Int {
    var result = 0
    for item in array {
        result += item.numberOfStringEntries
    }
    return result
}
