Skip to content

Commit

Permalink
Merge pull request #37 from hvbommel/fixDangling
Browse files Browse the repository at this point in the history
fix xcode12 dangling pointer warning
  • Loading branch information
merlos authored Oct 14, 2020
2 parents 5400066 + 52ddfba commit a47f263
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions MapCache/Classes/DiskCache/String+DiskCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ extension String {

let MD5Calculator = MD5(Array(data))
let MD5Data = MD5Calculator.calculate()
let resultBytes = UnsafeMutablePointer<CUnsignedChar>(mutating: MD5Data)
let resultEnumerator = UnsafeBufferPointer<CUnsignedChar>(start: resultBytes, count: MD5Data.count)
let MD5String = NSMutableString()
for c in resultEnumerator {
for c in MD5Data {
MD5String.appendFormat("%02x", c)
}
return MD5String as String
Expand Down

0 comments on commit a47f263

Please sign in to comment.