Skip to content

Commit

Permalink
MemoryOutputStream: optimize writeMacAddress()
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoltanBojthe committed Nov 22, 2024
1 parent bae9572 commit 80f38c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/inet/common/MemoryOutputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ class INET_API MemoryOutputStream
* and MSB to LSB bit order.
*/
void writeMacAddress(MacAddress address) {
for (int i = 0; i < MAC_ADDRESS_SIZE; i++)
writeByte(address.getAddressByte(i));
writeUint48Be(address.getInt());
}

/**
Expand Down

0 comments on commit 80f38c2

Please sign in to comment.