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:
authorDaniel Garcia <danielgarcia@gmail.com>2014-03-11 23:28:07 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-03-11 23:28:07 +0400
commitff1d48b314ea14e73f2f14762fab01c087e9ee20 (patch)
tree1bf770aacc1ae43ab6210d291c6d57a0fce71e37 /FastLED.cpp
parent5ff29548312ed8621fe08d67e22939938e9a5ecf (diff)
Make FastLED.addLeds return a reference instead of a pointer.
Diffstat (limited to 'FastLED.cpp')
-rw-r--r--FastLED.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/FastLED.cpp b/FastLED.cpp
index a361c80a..4db607a6 100644
--- a/FastLED.cpp
+++ b/FastLED.cpp
@@ -18,7 +18,7 @@ CFastLED::CFastLED() {
memset8(m_Controllers, 0, m_nControllers * sizeof(CControllerInfo));
}
-CLEDController *CFastLED::addLeds(CLEDController *pLed,
+CLEDController &CFastLED::addLeds(CLEDController *pLed,
const struct CRGB *data,
int nLedsOrOffset, int nLedsIfOffset) {
int nOffset = (nLedsIfOffset > 0) ? nLedsOrOffset : 0;
@@ -41,10 +41,9 @@ CLEDController *CFastLED::addLeds(CLEDController *pLed,
m_Controllers[target].nOffset = nOffset;
m_Controllers[target].nLeds = nLeds;
pLed->init();
- return pLed;
}
- return NULL;
+ return *pLed;
}
void CFastLED::show(CRGB scale) {