summaryrefslogtreecommitdiff
path: root/Source/Core/Common/UPnP.cpp
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-08-06 23:45:39 -0700
committerMichael M <mchtly@gmail.com>2017-08-13 18:50:52 -0700
commitff1d1a7a4d2c020f647000070ea73791f7073c43 (patch)
tree10597ad608a59940dea02b42766a4dc3a9dc88da /Source/Core/Common/UPnP.cpp
parent862e0bec7961441103db917f8fe63cffdaa89afc (diff)
UPnP: use std::to_string
Diffstat (limited to 'Source/Core/Common/UPnP.cpp')
-rw-r--r--Source/Core/Common/UPnP.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/Common/UPnP.cpp b/Source/Core/Common/UPnP.cpp
index cb4a51574c..bedecf9a43 100644
--- a/Source/Core/Common/UPnP.cpp
+++ b/Source/Core/Common/UPnP.cpp
@@ -7,15 +7,16 @@
#include "Common/UPnP.h"
#include "Common/Logging/Log.h"
-#include "Common/StringUtil.h"
#include <array>
+#include <cstdlib>
#include <cstring>
#include <miniupnpc.h>
#include <miniwget.h>
#include <string>
#include <thread>
#include <upnpcommands.h>
+#include <vector>
static UPNPUrls s_urls;
static IGDdatas s_data;
@@ -108,7 +109,7 @@ static bool InitUPnP()
// --
static bool UnmapPort(const u16 port)
{
- std::string port_str = StringFromFormat("%d", port);
+ std::string port_str = std::to_string(port);
UPNP_DeletePortMapping(s_urls.controlURL, s_data.first.servicetype, port_str.c_str(), "UDP",
nullptr);
@@ -122,7 +123,7 @@ static bool MapPort(const char* addr, const u16 port)
if (s_mapped > 0)
UnmapPort(s_mapped);
- std::string port_str = StringFromFormat("%d", port);
+ std::string port_str = std::to_string(port);
int result = UPNP_AddPortMapping(
s_urls.controlURL, s_data.first.servicetype, port_str.c_str(), port_str.c_str(), addr,
(std::string("dolphin-emu UDP on ") + addr).c_str(), "UDP", nullptr, nullptr);