-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
This lib makes heavy use of pass by reference, even where it is not necessary or even counterproductive.
For example since smlState
expects a unsigned char &
one can not do something like currentState = smlState(Serial.read())
.
I don't think passing by reference of primitive types like char
has any performance advantages, on the contrary it is probably even slower than just passing by value since the address is bigger than the value.
If you really want to pass by reference here you should make it const unsigned char &
to avoid having to read the bytes into a variable befor passing to smlState.
schlimmchen
Metadata
Metadata
Assignees
Labels
No labels