From 8f46713b0dd04f34654ff69fcc7e943aa3e55bb1 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Wed, 19 Dec 2018 16:23:29 +0530 Subject: [PATCH] Remove non-helpful comments --- WireGuard/Shared/Model/DNSServer.swift | 2 -- WireGuard/Shared/Model/Endpoint.swift | 2 -- WireGuard/Shared/Model/IPAddressRange.swift | 2 -- .../UI/iOS/ViewController/SettingsTableViewController.swift | 1 - .../UI/iOS/ViewController/TunnelDetailTableViewController.swift | 2 -- .../UI/iOS/ViewController/TunnelEditTableViewController.swift | 1 - .../UI/iOS/ViewController/TunnelsListTableViewController.swift | 1 - WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift | 2 -- 8 files changed, 13 deletions(-) diff --git a/WireGuard/Shared/Model/DNSServer.swift b/WireGuard/Shared/Model/DNSServer.swift index bb20c02..d1c75fc 100644 --- a/WireGuard/Shared/Model/DNSServer.swift +++ b/WireGuard/Shared/Model/DNSServer.swift @@ -10,7 +10,6 @@ struct DNSServer { } // MARK: Converting to and from String -// For use in the UI extension DNSServer { init?(from addressString: String) { @@ -28,7 +27,6 @@ extension DNSServer { } // MARK: Codable -// For serializing to disk @available(OSX 10.14, iOS 12.0, *) extension DNSServer: Codable { diff --git a/WireGuard/Shared/Model/Endpoint.swift b/WireGuard/Shared/Model/Endpoint.swift index 41ea41f..3a4beee 100644 --- a/WireGuard/Shared/Model/Endpoint.swift +++ b/WireGuard/Shared/Model/Endpoint.swift @@ -11,7 +11,6 @@ struct Endpoint { } // MARK: Converting to and from String -// For use in the UI extension Endpoint { init?(from string: String) { @@ -55,7 +54,6 @@ extension Endpoint { } // MARK: Codable -// For serializing to disk @available(OSX 10.14, iOS 12.0, *) extension Endpoint: Codable { diff --git a/WireGuard/Shared/Model/IPAddressRange.swift b/WireGuard/Shared/Model/IPAddressRange.swift index 468e3aa..0098c32 100644 --- a/WireGuard/Shared/Model/IPAddressRange.swift +++ b/WireGuard/Shared/Model/IPAddressRange.swift @@ -11,7 +11,6 @@ struct IPAddressRange { } // MARK: Converting to and from String -// For use in the UI extension IPAddressRange { init?(from string: String) { @@ -45,7 +44,6 @@ extension IPAddressRange { } // MARK: Codable -// For serializing to disk @available(OSX 10.14, iOS 12.0, *) extension IPAddressRange: Codable { diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift index b583c5b..65ad2fe 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift @@ -127,7 +127,6 @@ class SettingsTableViewController: UITableViewController { DispatchQueue.main.async { let activityVC = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil) - // popoverPresentationController shall be non-nil on the iPad activityVC.popoverPresentationController?.sourceView = sourceView activityVC.popoverPresentationController?.sourceRect = sourceView.bounds activityVC.completionWithItemsHandler = { _, _, _, _ in diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift index cd6c7d8..6fb54fc 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift @@ -61,7 +61,6 @@ class TunnelDetailTableViewController: UITableViewController { tableView.register(KeyValueCell.self) tableView.register(ButtonCell.self) - // State restoration restorationIdentifier = "TunnelDetailVC:\(tunnel.name)" } @@ -91,7 +90,6 @@ class TunnelDetailTableViewController: UITableViewController { alert.addAction(destroyAction) alert.addAction(cancelAction) - // popoverPresentationController will be nil on iPhone and non-nil on iPad alert.popoverPresentationController?.sourceView = sourceView alert.popoverPresentationController?.sourceRect = sourceView.bounds diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift index e119303..f92f283 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift @@ -449,7 +449,6 @@ extension TunnelEditTableViewController { alert.addAction(destroyAction) alert.addAction(cancelAction) - // popoverPresentationController will be nil on iPhone and non-nil on iPad alert.popoverPresentationController?.sourceView = sourceView alert.popoverPresentationController?.sourceRect = sourceView.bounds diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift index 0596139..3225fe0 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift @@ -118,7 +118,6 @@ class TunnelsListTableViewController: UIViewController { let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) alert.addAction(cancelAction) - // popoverPresentationController will be nil on iPhone and non-nil on iPad if let sender = sender as? UIBarButtonItem { alert.popoverPresentationController?.barButtonItem = sender } else if let sender = sender as? UIView { diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift index 9a3aede..814ed59 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -59,8 +59,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider { let packetTunnelSettingsGenerator = PacketTunnelSettingsGenerator(tunnelConfiguration: tunnelConfiguration, resolvedEndpoints: resolvedEndpoints) - // Bring up wireguard-go backend - let fileDescriptor = packetFlow.value(forKeyPath: "socket.fileDescriptor") as! Int32 //swiftlint:disable:this force_cast if fileDescriptor < 0 { wg_log(.error, staticMessage: "Starting tunnel failed: Could not determine file descriptor")