You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several reasons but the two main ones are:
It would be more digestible for newbies to have to understand that they need to use a pointer ie. they would not need to call parseStream(&Serial) but simply parseStream(Serial).
It prevents sending erroneous addresses including parseStream(0) which is syntactically valid but will result in a runtime error.
The text was updated successfully, but these errors were encountered:
I suggest we change function:
to:
Same for functions such as
streamPacket(Stream*)
and others.We could keep the old functions for backwards compatibility but the reference version would be preferred.
There is a discussion here on when to use references vs pointers, I believe it applies to our case:
https://stackoverflow.com/questions/7058339/when-to-use-references-vs-pointers
There are several reasons but the two main ones are:
parseStream(&Serial)
but simplyparseStream(Serial)
.parseStream(0)
which is syntactically valid but will result in a runtime error.The text was updated successfully, but these errors were encountered: