Skip to content

Commit

Permalink
Add specializations of swapEndian to avoid compiler warnings (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenLightning authored Jan 6, 2022
1 parent 88f7972 commit cfa2611
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions happly.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ T swapEndian(T val) {
return val;
}

// The following specializations for single-byte types are used to avoid compiler warnings.
template <> int8_t swapEndian<int8_t>(int8_t val) { return val; }
template <> uint8_t swapEndian<uint8_t>(uint8_t val) { return val; }


// Unpack flattened list from the convention used in TypedListProperty
template <typename T>
Expand Down

0 comments on commit cfa2611

Please sign in to comment.