From df57f7768620c19647200fac183cbea072f3ef1d Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 11 Oct 2022 05:38:47 -0700 Subject: [PATCH] Remove whitespace --- Meshtastic/Helpers/Extensions.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Meshtastic/Helpers/Extensions.swift b/Meshtastic/Helpers/Extensions.swift index 1640950f..de4b4ddf 100644 --- a/Meshtastic/Helpers/Extensions.swift +++ b/Meshtastic/Helpers/Extensions.swift @@ -44,16 +44,13 @@ extension String { var hexadecimal: Data? { var data = Data(capacity: count / 2) - let regex = try! NSRegularExpression(pattern: "[0-9a-f]{1,2}", options: .caseInsensitive) regex.enumerateMatches(in: self, range: NSRange(startIndex..., in: self)) { match, _, _ in let byteString = (self as NSString).substring(with: match!.range) let num = UInt8(byteString, radix: 16)! data.append(num) } - guard data.count > 0 else { return nil } - return data } @@ -80,7 +77,6 @@ extension String { let font = UIFont.systemFont(ofSize: fontSize) let attributes = [NSAttributedString.Key.font: font] let imageSize = imageSize ?? self.size(withAttributes: attributes) - UIGraphicsBeginImageContextWithOptions(imageSize, false, 0) bgColor.set() let rect = CGRect(origin: .zero, size: imageSize)