Skip to content

Commit

Permalink
Merge pull request #120 from joto/avoid-shadowing
Browse files Browse the repository at this point in the history
Avoid variable name "data" because it shadows the data() member func
  • Loading branch information
joto authored Dec 20, 2024
2 parents d14dcae + 091295e commit a7dab95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/protozero/pbf_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class pbf_reader {
template <typename T>
T get_fixed() {
T result;
const char* data = m_data;
const char* tmp_data = m_data;
skip_bytes(sizeof(T));
std::memcpy(&result, data, sizeof(T));
std::memcpy(&result, tmp_data, sizeof(T));
#if PROTOZERO_BYTE_ORDER != PROTOZERO_LITTLE_ENDIAN
byteswap_inplace(&result);
#endif
Expand Down

0 comments on commit a7dab95

Please sign in to comment.