Skip to content

Commit 5ae4148

Browse files
committed
MemoryInputStream: optimize readMacAddress
1 parent 80f38c2 commit 5ae4148

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/inet/common/MemoryInputStream.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,7 @@ class INET_API MemoryInputStream
437437
* byte order and MSB to LSB bit order.
438438
*/
439439
MacAddress readMacAddress() {
440-
MacAddress address;
441-
for (int i = 0; i < MAC_ADDRESS_SIZE; i++)
442-
address.setAddressByte(i, readByte());
443-
return address;
440+
return MacAddress(readUint48Be());
444441
}
445442

446443
/**

0 commit comments

Comments
 (0)