summaryrefslogtreecommitdiff
path: root/core/io/ip_address.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/ip_address.h')
-rw-r--r--core/io/ip_address.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/core/io/ip_address.h b/core/io/ip_address.h
index 39948ce211..2f8f83503e 100644
--- a/core/io/ip_address.h
+++ b/core/io/ip_address.h
@@ -51,23 +51,32 @@ protected:
public:
//operator Variant() const;
bool operator==(const IP_Address &p_ip) const {
- if (p_ip.valid != valid)
+ if (p_ip.valid != valid) {
return false;
- if (!valid)
+ }
+ if (!valid) {
return false;
- for (int i = 0; i < 4; i++)
- if (field32[i] != p_ip.field32[i])
+ }
+ for (int i = 0; i < 4; i++) {
+ if (field32[i] != p_ip.field32[i]) {
return false;
+ }
+ }
return true;
}
+
bool operator!=(const IP_Address &p_ip) const {
- if (p_ip.valid != valid)
+ if (p_ip.valid != valid) {
return true;
- if (!valid)
+ }
+ if (!valid) {
return true;
- for (int i = 0; i < 4; i++)
- if (field32[i] != p_ip.field32[i])
+ }
+ for (int i = 0; i < 4; i++) {
+ if (field32[i] != p_ip.field32[i]) {
return true;
+ }
+ }
return false;
}