Use Common::ToLower and Common::ToUpper

This commit is contained in:
Pokechu22
2022-01-16 16:38:11 -08:00
parent aaec64501a
commit 6e5f4125e3
16 changed files with 29 additions and 47 deletions

View File

@ -4,7 +4,6 @@
#include "Common/Network.h"
#include <algorithm>
#include <cctype>
#include <string_view>
#ifndef _WIN32
@ -18,6 +17,7 @@
#include <fmt/format.h>
#include "Common/Random.h"
#include "Common/StringUtil.h"
namespace Common
{
@ -59,7 +59,7 @@ std::optional<MACAddress> StringToMacAddress(std::string_view mac_string)
for (size_t i = 0; i < mac_string.size() && x < (MAC_ADDRESS_SIZE * 2); ++i)
{
char c = tolower(mac_string.at(i));
char c = Common::ToLower(mac_string.at(i));
if (c >= '0' && c <= '9')
{
mac[x / 2] |= (c - '0') << ((x & 1) ? 0 : 4);