diff options
Diffstat (limited to 'modules/upnp')
-rw-r--r-- | modules/upnp/upnp.cpp | 4 | ||||
-rw-r--r-- | modules/upnp/upnp_device.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/upnp/upnp.cpp b/modules/upnp/upnp.cpp index 988bf3017d..3c9bf9a4b4 100644 --- a/modules/upnp/upnp.cpp +++ b/modules/upnp/upnp.cpp @@ -36,7 +36,7 @@ #include <stdlib.h> bool UPNP::is_common_device(const String &dev) const { - return dev.empty() || + return dev.is_empty() || dev.find("InternetGatewayDevice") >= 0 || dev.find("WANIPConnection") >= 0 || dev.find("WANPPPConnection") >= 0 || @@ -76,7 +76,7 @@ int UPNP::discover(int timeout, int ttl, const String &device_filter) { struct UPNPDev *dev = devlist; while (dev) { - if (device_filter.empty() || strstr(dev->st, device_filter.utf8().get_data())) { + if (device_filter.is_empty() || strstr(dev->st, device_filter.utf8().get_data())) { add_device_to_list(dev, devlist); } diff --git a/modules/upnp/upnp_device.cpp b/modules/upnp/upnp_device.cpp index 40eb6106a0..34af6898be 100644 --- a/modules/upnp/upnp_device.cpp +++ b/modules/upnp/upnp_device.cpp @@ -65,7 +65,7 @@ int UPNPDevice::add_port_mapping(int port, int port_internal, String desc, Strin itos(port).utf8().get_data(), itos(port_internal).utf8().get_data(), igd_our_addr.utf8().get_data(), - desc.empty() ? nullptr : desc.utf8().get_data(), + desc.is_empty() ? nullptr : desc.utf8().get_data(), proto.utf8().get_data(), nullptr, // Remote host, always nullptr as IGDs don't support it duration > 0 ? itos(duration).utf8().get_data() : nullptr); |