In lv_area.h line 78 memcpy(dest, src, sizeof(lv_area_t));
causes cpp compilers to complain about invalid type conversions. I have used a patched version of lvgl with a cpp based real-time operating system (RODOS) without issues. From my point of view, modifying lv_area for cpp compatibility would benefit other people working with cpp and trying to use lvgl. Should I open a github issue? Are there cpp related discussions that may be of interest to me?
Interesting. I don’t think I’ve ever seen a warning about this line. What compiler are you using?
Generally, our goal is to have the header files able to be included by a C++ compiler without any issues.
Do you think we should cast the parameters to be sure?
memcpy((void*)dest, (const void *)src, sizeof(lv_area_t));
Altough, I’m not sure if it is really worth calling memcpy
here. Simply assigning the 4 coordinates might be faster.
@knicklux It appears that the forum thought you had typed too fast and prevented you from creating new posts. Sorry about that; if this is still an issue, please feel free to comment here.