Core/NetPlayServer: Use fmt::format_to_n in GetInterfaceHost()
Lets us avoid some noisy deprecation warnings on macOS (and also lets us use a more generic formatting specifier).
This commit is contained in:
parent
2b877fc92b
commit
9abcc1c08b
|
@ -2294,8 +2294,9 @@ std::unordered_set<std::string> NetPlayServer::GetInterfaceSet() const
|
||||||
// called from ---GUI--- thread
|
// called from ---GUI--- thread
|
||||||
std::string NetPlayServer::GetInterfaceHost(const std::string& inter) const
|
std::string NetPlayServer::GetInterfaceHost(const std::string& inter) const
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16]{};
|
||||||
sprintf(buf, ":%d", GetPort());
|
fmt::format_to_n(buf, sizeof(buf) - 1, ":{}", GetPort());
|
||||||
|
|
||||||
auto lst = GetInterfaceListInternal();
|
auto lst = GetInterfaceListInternal();
|
||||||
for (const auto& list_entry : lst)
|
for (const auto& list_entry : lst)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue