Update Sprite.cpp
TODO's added regarding errors when compiling without 'build_flags = -w' option
Option 'build_flags = -w' in platformio.ini file resolves the issue, but nevertheless the errors should be fixed at the source.
Thanks for pointing this out! A return *this; at the end of each of those functions will remove the warnings. Add those changes and I'll merge the PR
Filip
NOTE: a) the fist two commits deal with no-return-value errors regarding Sprite.cpp file and they should be resolved by the second commit (as suggested by @filipbudisa in the previous comment). b) the third commit is about a new issue: additionally found no-return-value errors in other two files (LowRamScreen.impl and ScrollLayout.cpp); I guess this commit had to belong to a new PR (but obviously it does not). So I suggest that in the next commit the newly found errors are fixed and then the PR is merged as a "package" and closed.
In order to resolve the newly found no-return-value errors, please confirm/answer to the following assumption/question:
In case of
- UI\LowRamScreen.impl: virtual Screen& Screen::addChild(Element*)
probably return *this; will do.
But what to return from
- UI\ScrollLayout.cpp: virtual ElementContainer& ScrollLayout::addChild(Element*) ?
For ElementContainer& ScrollLayout::addChild(Element*) I returned also *this as ScrollLayout class is derived from ElementContainer class.