sources/network/ipaddress.cpp

changeset 185
e83ec58cc458
parent 184
afd63357a03d
child 186
9330b93d9946
--- a/sources/network/ipaddress.cpp	Wed Jan 27 14:06:45 2021 +0200
+++ b/sources/network/ipaddress.cpp	Wed Jan 27 14:16:58 2021 +0200
@@ -80,7 +80,7 @@
 //
 bool IPAddress::compare (const IPAddress& other) const
 {
-	for (int i : range(4))
+	for (int i = 0; i < 4; i += 1)
 	{
 		if (octet (i) != other.octet (i))
 			return false;
@@ -100,7 +100,7 @@
 //
 bool IPAddress::operator< (const IPAddress& other) const
 {
-	for (int i : range(4))
+	for (int i = 0; i < 4; i += 1)
 	{
 		if (octet (i) != other.octet (i))
 			return octet (i) < other.octet (i);
@@ -133,7 +133,7 @@
 	// Try scanf the IPv4 host first
 	if (sscanf(addressString.data(), "%u.%u.%u.%u", &parts[0], &parts[1], &parts[2], &parts[3]))
 	{
-		for (int i : range(4))
+		for (int i = 0; i < 4; i += 1)
 			value.set_octet (i, parts[i]);
 	}
 	else

mercurial