These are chat archives for Makuna/NeoPixelBus

Jun 2016
Jun 09 2016 05:23
@makuna What is the correct format for this line?
    uint8_t *ptr = _pixels, *end = _pixels + _sizePixels;
Maybe this?
uint8_t ptr = _pixels, end = _pixels + _sizePixels;
Or one declaration per line?
sorry, one definition per line
Michael Miller
Jun 09 2016 05:27
one per line...
  uint8_t* ptr = _pixels;
  uint8_t* end = _pixels + _sizePixels;
another way to think of it is; in a definition, one type per variable, one variable per type.
further, a space between the type and the variable name, since the type is a pointer to uint8_t; this is why the * goes with the uint8_t.