summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Network.cpp')
-rw-r--r--Source/Core/Common/Network.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/Common/Network.cpp b/Source/Core/Common/Network.cpp
index 77d835a126..a928e8e831 100644
--- a/Source/Core/Common/Network.cpp
+++ b/Source/Core/Common/Network.cpp
@@ -6,8 +6,6 @@
#include <algorithm>
#include <cctype>
-#include <cstring>
-#include <ctime>
#include <fmt/format.h>
@@ -43,10 +41,10 @@ std::string MacAddressToString(const MACAddress& mac)
mac[4], mac[5]);
}
-std::optional<MACAddress> StringToMacAddress(const std::string& mac_string)
+std::optional<MACAddress> StringToMacAddress(std::string_view mac_string)
{
if (mac_string.empty())
- return {};
+ return std::nullopt;
int x = 0;
MACAddress mac{};
@@ -70,7 +68,7 @@ std::optional<MACAddress> StringToMacAddress(const std::string& mac_string)
// nibble is a character in the MAC address, making 12 characters
// in total.
if (x / 2 != MAC_ADDRESS_SIZE)
- return {};
+ return std::nullopt;
return std::make_optional(mac);
}