aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-22 04:06:27 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-22 04:06:37 +0530
commit273ee04450b776bb5456c75ef17caa2e9e5ed2e7 (patch)
tree722f2ed10ef9357a456561bd9552fe69d7316671 /WireGuard/WireGuard/UI
parentmacOS: Tunnel edit: actually clean up error handling (diff)
downloadwireguard-apple-273ee04450b776bb5456c75ef17caa2e9e5ed2e7.tar.xz
wireguard-apple-273ee04450b776bb5456c75ef17caa2e9e5ed2e7.zip
Better os() directives
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI')
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift8
1 files changed, 6 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index 50d97c39..07d1bac1 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -461,11 +461,13 @@ extension TunnelViewModel {
return tr("tunnelOnDemandOptionWiFiOrCellular")
case .useOnDemandOverCellularOnly:
return tr("tunnelOnDemandOptionCellularOnly")
- #elseif os(OSX)
+ #elseif os(macOS)
case .useOnDemandOverWiFiOrEthernet:
return tr("tunnelOnDemandOptionWiFiOrEthernet")
case .useOnDemandOverEthernetOnly:
return tr("tunnelOnDemandOptionEthernetOnly")
+ #else
+ #error("Unimplemented")
#endif
}
}
@@ -485,8 +487,10 @@ extension TunnelViewModel {
static func defaultActivateOnDemandOption() -> ActivateOnDemandOption {
#if os(iOS)
return .useOnDemandOverWiFiOrCellular
- #elseif os(OSX)
+ #elseif os(macOS)
return .useOnDemandOverWiFiOrEthernet
+ #else
+ #error("Unimplemented")
#endif
}
}