aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/IPAddress.h
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino/IPAddress.h')
-rw-r--r--cores/arduino/IPAddress.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/cores/arduino/IPAddress.h b/cores/arduino/IPAddress.h
index c2dd7e5..6ea8127 100644
--- a/cores/arduino/IPAddress.h
+++ b/cores/arduino/IPAddress.h
@@ -20,6 +20,7 @@
#ifndef IPAddress_h
#define IPAddress_h
+#include <stdint.h>
#include <Printable.h>
// A class to make it easier to handle and pass around IP addresses
@@ -42,9 +43,9 @@ public:
// Overloaded cast operator to allow IPAddress objects to be used where a pointer
// to a four-byte uint8_t array is expected
- operator uint32_t() { return *((uint32_t*)_address); };
- bool operator==(const IPAddress& addr) { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };
- bool operator==(const uint8_t* addr);
+ operator uint32_t() const { return *((uint32_t*)_address); };
+ bool operator==(const IPAddress& addr) const { return (*((uint32_t*)_address)) == (*((uint32_t*)addr._address)); };
+ bool operator==(const uint8_t* addr) const;
// Overloaded index operator to allow getting and setting individual octets of the address
uint8_t operator[](int index) const { return _address[index]; };