]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
build: Fix swift warnings
authorRoopesh Chander <roop@roopc.net>
Mon, 2 Aug 2021 08:16:06 +0000 (13:46 +0530)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 22 Sep 2021 04:58:14 +0000 (06:58 +0200)
Use 'AnyObject' instead of 'class' to restrict protocol inheritance

Signed-off-by: Roopesh Chander <roop@roopc.net>
Sources/WireGuardApp/Tunnel/TunnelsManager.swift
Sources/WireGuardApp/UI/iOS/ViewController/QRScanViewController.swift
Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
Sources/WireGuardApp/UI/macOS/StatusMenu.swift
Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift
Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift

index 2865f7aef47af3b1f4a51b92496b057090da80b5..fe3955bd6e03ecbeee46b42ce71cd529e5386d95 100644 (file)
@@ -5,14 +5,14 @@ import Foundation
 import NetworkExtension
 import os.log
 
-protocol TunnelsManagerListDelegate: class {
+protocol TunnelsManagerListDelegate: AnyObject {
     func tunnelAdded(at index: Int)
     func tunnelModified(at index: Int)
     func tunnelMoved(from oldIndex: Int, to newIndex: Int)
     func tunnelRemoved(at index: Int, tunnel: TunnelContainer)
 }
 
-protocol TunnelsManagerActivationDelegate: class {
+protocol TunnelsManagerActivationDelegate: AnyObject {
     func tunnelActivationAttemptFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationAttemptError) // startTunnel wasn't called or failed
     func tunnelActivationAttemptSucceeded(tunnel: TunnelContainer) // startTunnel succeeded
     func tunnelActivationFailed(tunnel: TunnelContainer, error: TunnelsManagerActivationError) // status didn't change to connected
index 601f7b8a348c67ff68358ab61cb931af97f00498..4be0d67bf7987f2ae124999d90c3e711cec0ec6f 100644 (file)
@@ -4,7 +4,7 @@
 import AVFoundation
 import UIKit
 
-protocol QRScanViewControllerDelegate: class {
+protocol QRScanViewControllerDelegate: AnyObject {
     func addScannedQRCode(tunnelConfiguration: TunnelConfiguration, qrScanViewController: QRScanViewController, completionHandler: (() -> Void)?)
 }
 
index 56a344778624354b7ebf016d71af2dd5bc9af04e..a3647c39e269daa9eaab8cc6812ead143869bb8d 100644 (file)
@@ -5,7 +5,7 @@ import UIKit
 import SystemConfiguration.CaptiveNetwork
 import NetworkExtension
 
-protocol SSIDOptionEditTableViewControllerDelegate: class {
+protocol SSIDOptionEditTableViewControllerDelegate: AnyObject {
     func ssidOptionSaved(option: ActivateOnDemandViewModel.OnDemandSSIDOption, ssids: [String])
 }
 
index e619a8a918226d810ad0d97bc6ace5760402861c..e4d94d3ee78ca6e36e0f518f92b01f826935ab01 100644 (file)
@@ -3,7 +3,7 @@
 
 import UIKit
 
-protocol TunnelEditTableViewControllerDelegate: class {
+protocol TunnelEditTableViewControllerDelegate: AnyObject {
     func tunnelSaved(tunnel: TunnelContainer)
     func tunnelEditingCancelled()
 }
index 79d0cbc0fe10ca3b6216d7fa4debea173dee0706..6cd00a424c783b80c66b7be96cb759f976fc84ee 100644 (file)
@@ -3,7 +3,7 @@
 
 import Cocoa
 
-protocol StatusMenuWindowDelegate: class {
+protocol StatusMenuWindowDelegate: AnyObject {
     func showManageTunnelsWindow(completion: ((NSWindow?) -> Void)?)
 }
 
index 139b00e162e74db0b45180442474336da9510f91..c1f7c744772dfc34bd37c09e867de005955db8c1 100644 (file)
@@ -3,7 +3,7 @@
 
 import Cocoa
 
-protocol TunnelEditViewControllerDelegate: class {
+protocol TunnelEditViewControllerDelegate: AnyObject {
     func tunnelSaved(tunnel: TunnelContainer)
     func tunnelEditingCancelled()
 }
index e1fd1e8bf60ca417b88a17c11189a13ca82f1dd7..7c94dbb205cfdb64cf88b3293745822fec030992 100644 (file)
@@ -3,7 +3,7 @@
 
 import Cocoa
 
-protocol TunnelsListTableViewControllerDelegate: class {
+protocol TunnelsListTableViewControllerDelegate: AnyObject {
     func tunnelsSelected(tunnelIndices: [Int])
     func tunnelsListEmpty()
 }