Skip to content

Commit

Permalink
Merge pull request #61 from sarfata/do-not-redefine-bit
Browse files Browse the repository at this point in the history
Do not redefine macro BIT(x) if already defined
  • Loading branch information
ttlappalainen authored Jul 24, 2017
2 parents ab2b499 + 6d6fe93 commit 6835188
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/N2kMsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const uint16_t N2kUInt16NA=0xffff;
const int16_t N2kInt16NA=0x7fff;
const uint32_t N2kUInt32NA=0xffffffff;
const int32_t N2kInt32NA=0x7fffffff;
#ifndef BIT
#define BIT(n) (1 << n)
#endif

inline bool N2kIsNA(double v) { return v==N2kDoubleNA; }
inline bool N2kIsNA(uint8_t v) { return v==N2kUInt8NA; }
Expand Down

0 comments on commit 6835188

Please sign in to comment.