Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeFadeToGrey
languagecpp
EncodedPacket(uint8_t *dataRef);
//NOT
EncodedPacket(uint8_t dataRef);

Constexpr, not Macros

Use constant expressions (constexpr) for small helper functions.

Code Block
languagecpp
constexpr int square(int x) { return x*x; }
//NOT
#define SQUARE(r) ((r)*(r))
double square_macro = AREA(4.6);