Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions teensy/IPAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class IPAddress : public Printable {
bool operator==(const uint8_t* addr);

// Overloaded index operator to allow getting and setting individual octets of the address
uint8_t operator[](int index) const { return _address.bytes[index]; };
uint8_t& operator[](int index) { return _address.bytes[index]; };
uint8_t& operator[](const size_t index) { return _address.bytes[index]; }
const uint8_t& operator[](const size_t index) const { return _address.bytes[index]; }

// Overloaded copy operators to allow initialisation of IPAddress objects from other types
IPAddress& operator=(const uint8_t *address);
Expand Down
8 changes: 4 additions & 4 deletions teensy3/IPAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ class IPAddress : public Printable {
}

// Overloaded index operator to allow getting and setting individual octets of the address
uint8_t operator[](int index) const {
uint8_t& operator[](const size_t index) {
return _address.bytes[index];
};
uint8_t& operator[](int index) {
}
const uint8_t& operator[](const size_t index) const {
return _address.bytes[index];
};
}

// Overloaded copy operators to allow initialisation of IPAddress objects from other types
IPAddress& operator=(const uint8_t *address) {
Expand Down
8 changes: 4 additions & 4 deletions teensy4/IPAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ class IPAddress : public Printable {
}

// Overloaded index operator to allow getting and setting individual octets of the address
uint8_t operator[](int index) const {
uint8_t& operator[](const size_t index) {
return _address.bytes[index];
};
uint8_t& operator[](int index) {
}
const uint8_t& operator[](const size_t index) const {
return _address.bytes[index];
};
}

// Overloaded copy operators to allow initialisation of IPAddress objects from other types
IPAddress& operator=(const uint8_t *address) {
Expand Down