summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/ip_unix.cpp12
-rw-r--r--drivers/unix/ip_unix.h2
-rw-r--r--drivers/unix/net_socket_posix.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index d442e521bf..2deeb79957 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -128,7 +128,7 @@ void IPUnix::_resolve_hostname(List<IPAddress> &r_addresses, const String &p_hos
#if defined(UWP_ENABLED)
-void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const {
+void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const {
using namespace Windows::Networking;
using namespace Windows::Networking::Connectivity;
@@ -143,7 +143,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con
}
String name = hostname->RawName->Data();
- Map<String, Interface_Info>::Element *E = r_interfaces->find(name);
+ HashMap<String, Interface_Info>::Element *E = r_interfaces->find(name);
if (!E) {
Interface_Info info;
info.name = name;
@@ -162,7 +162,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con
#else
-void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const {
+void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const {
ULONG buf_size = 1024;
IP_ADAPTER_ADDRESSES *addrs;
@@ -212,7 +212,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con
#else // UNIX
-void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const {
+void IPUnix::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const {
struct ifaddrs *ifAddrStruct = nullptr;
struct ifaddrs *ifa = nullptr;
int family;
@@ -230,7 +230,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con
continue;
}
- Map<String, Interface_Info>::Element *E = r_interfaces->find(ifa->ifa_name);
+ HashMap<String, Interface_Info>::Iterator E = r_interfaces->find(ifa->ifa_name);
if (!E) {
Interface_Info info;
info.name = ifa->ifa_name;
@@ -240,7 +240,7 @@ void IPUnix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) con
ERR_CONTINUE(!E);
}
- Interface_Info &info = E->get();
+ Interface_Info &info = E->value;
info.ip_addresses.push_front(_sockaddr2ip(ifa->ifa_addr));
}
diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h
index f0ad01d248..06fcdb6e17 100644
--- a/drivers/unix/ip_unix.h
+++ b/drivers/unix/ip_unix.h
@@ -43,7 +43,7 @@ class IPUnix : public IP {
static IP *_create_unix();
public:
- virtual void get_local_interfaces(Map<String, Interface_Info> *r_interfaces) const override;
+ virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const override;
static void make_default();
IPUnix();
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 3130d5cae2..f172f31b24 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -256,7 +256,7 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str
IPAddress if_ip;
uint32_t if_v6id = 0;
- Map<String, IP::Interface_Info> if_info;
+ HashMap<String, IP::Interface_Info> if_info;
IP::get_singleton()->get_local_interfaces(&if_info);
for (KeyValue<String, IP::Interface_Info> &E : if_info) {
IP::Interface_Info &c = E.value;