diff options
author | Matt Spinler <spinler@us.ibm.com> | 2019-10-11 15:15:19 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2019-10-22 09:10:37 -0500 |
commit | 237570de660f6c20493d045d62be6362ec4b9eaf (patch) | |
tree | c65612d36fd57ccd62ecf45d28614368e5c6fc4d | |
parent | ceac9690b410ce99c49dc4b59529456e5eab2322 (diff) | |
download | phosphor-logging-237570de660f6c20493d045d62be6362ec4b9eaf.tar.gz phosphor-logging-237570de660f6c20493d045d62be6362ec4b9eaf.zip |
PEL: Stream: Don't use references for << ops
There was no need for the stream insertion operator, <<,
to take a uint8_t, char, uin16_t, uint32_t, or uint64_t as
a reference as they are small and they aren't being modified.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I9fbf28af7fa6e8e73fd2df8c102e1689647e686d
-rw-r--r-- | extensions/openpower-pels/stream.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/openpower-pels/stream.hpp b/extensions/openpower-pels/stream.hpp index 4922bc7..1a776f6 100644 --- a/extensions/openpower-pels/stream.hpp +++ b/extensions/openpower-pels/stream.hpp @@ -182,7 +182,7 @@ class Stream * @param[in] value - the value to write to the stream * @return Stream& */ - Stream& operator<<(uint8_t& value) + Stream& operator<<(uint8_t value) { write(&value, 1); return *this; @@ -194,7 +194,7 @@ class Stream * @param[in] value - the value to write to the stream * @return Stream& */ - Stream& operator<<(char& value) + Stream& operator<<(char value) { write(&value, 1); return *this; @@ -206,7 +206,7 @@ class Stream * @param[in] value - the value to write to the stream * @return Stream& */ - Stream& operator<<(uint16_t& value) + Stream& operator<<(uint16_t value) { uint16_t data = ntohs(value); write(&data, 2); @@ -219,7 +219,7 @@ class Stream * @param[in] value - the value to write to the stream * @return Stream& */ - Stream& operator<<(uint32_t& value) + Stream& operator<<(uint32_t value) { uint32_t data = ntohl(value); write(&data, 4); @@ -232,7 +232,7 @@ class Stream * @param[in] value - the value to write to the stream * @return Stream& */ - Stream& operator<<(uint64_t& value) + Stream& operator<<(uint64_t value) { uint64_t data = detail::ntohll(value); write(&data, 8); |