Arduino-Library-Button icon indicating copy to clipboard operation
Arduino-Library-Button copied to clipboard

Boolean flag negation with ternary operator instead of ! operator

Open kibergus opened this issue 13 years ago • 0 comments

Please don't write like this: if (_justPressed) {  _pToggleFlag ? _pToggleFlag=false : _pToggleFlag=true;  } Write like this: _pToggleFlag = !_pToggleFlag;

It is much faster and much more readable.

Or pull https://github.com/carlynorama/Arduino-Library-Button/pull/3

kibergus avatar Aug 15 '12 16:08 kibergus