panStamp / swap

Simple Wireless Abstract Protocol (SWAP) library for Arduino 1.6
GNU Lesser General Public License v3.0
23 stars 13 forks source link

Explicit narrowing cast in nvolatToFactoryDefaults #3

Closed lhelsloot closed 9 years ago

lhelsloot commented 9 years ago

In C++11, narrowing conversions as used in SWAP::nvolatToFactoryDefaults() (uint16_t truncated to uint8_t) are malformed within brackets. To allow compiling under C++0x and later, the narrowing conversions should be cast to the smaller type explicitly.