Closed vkichline closed 3 years ago
Both on purpose...
I like to be able to pass an invalid point there easily by passing Point()
. Cannot do that if ref.
People will want to change colors by just specifying them directly a la {RED, BLUE, NODRAW}
. Or they change them in a handler, and then it goes out of focus...
In the M5Button.h file, you use reference semantics consistently for Point parameters except in fingerDown and fingerMove. It might be better to always use references.
ButtonColors are always passed by value, which will result in a stack copy every time (and I imagine these are rarely modified by the callee.) I recommend using reference semantics uniformly for ButtonColors.