Skip to content

Commit

Permalink
Do not redefine F() if it's already defined
Browse files Browse the repository at this point in the history
This removes a Warning when compiling KBox tests because I already define F to be a no-op in other headers. I think checking whether F() is defined before re-defining it is the proper thing to do here.
  • Loading branch information
sarfata authored Jul 2, 2017
1 parent 5b2876a commit b289fe7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions N2kDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ extern uint32_t millis();
class __FlashStringHelper;
#define F(str) (reinterpret_cast<const __FlashStringHelper*>(PSTR(str)))
#else
#ifndef F
#define F(str) str
#endif
#endif

#endif

0 comments on commit b289fe7

Please sign in to comment.