Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kriegsman <kriegsman@tr.org>2015-12-27 17:21:31 +0300
committerMark Kriegsman <kriegsman@tr.org>2015-12-27 17:21:31 +0300
commit933b32f551c8d91e68dc135af4a9a4d6a71a2667 (patch)
treef7b49ca7957150ed454b45f13daf5e3d2d0ff0a6 /examples
parent5325c877174863151677f73ab8fc362356f2de63 (diff)
Fixed 'const' placement. Comments now match the code; presumably both are equally correct now.
Diffstat (limited to 'examples')
-rw-r--r--examples/XYMatrix/XYMatrix.ino5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/XYMatrix/XYMatrix.ino b/examples/XYMatrix/XYMatrix.ino
index ff0c5d14..53c21411 100644
--- a/examples/XYMatrix/XYMatrix.ino
+++ b/examples/XYMatrix/XYMatrix.ino
@@ -121,7 +121,7 @@ uint16_t XY( uint8_t x, uint8_t y)
// it, "leds_plus_safety_pixel". Then declare "leds" as a pointer to
// that array, but starting with the 2nd element (id=1) of that array:
// CRGB leds_with_safety_pixel[41];
-// const CRGB* leds( leds_plus_safety_pixel + 1);
+// CRGB* const leds( leds_plus_safety_pixel + 1);
// Then you use the "leds" array as you normally would.
// Now "leds[0..N]" are aliases for "leds_plus_safety_pixel[1..(N+1)]",
// AND leds[-1] is now a legitimate and safe alias for leds_plus_safety_pixel[0].
@@ -150,7 +150,7 @@ uint16_t XY( uint8_t x, uint8_t y)
#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
CRGB leds_plus_safety_pixel[ NUM_LEDS + 1];
-CRGB* leds( leds_plus_safety_pixel + 1);
+CRGB* const leds( leds_plus_safety_pixel + 1);
uint16_t XYsafe( uint8_t x, uint8_t y)
{
@@ -194,4 +194,3 @@ void setup() {
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalSMD5050);
FastLED.setBrightness( BRIGHTNESS );
}
-