ropg / M5Core2

M5Core2 Arduino Library
MIT License
7 stars 1 forks source link

Consistent semantics #52

Closed vkichline closed 3 years ago

vkichline commented 3 years ago

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.

ropg commented 3 years ago

Both on purpose...