Description
I did a small experiment, changing in BLEClient this function BLERemoteService * getService(const BLEUUID &uuid)
, so I passed a const reference instead of the object. This lead to having to change in BLEUUID the function std::string toString() const
, because the compiler complaint about passing a non-const this
parameter.
In a very small program this saved 12 bytes of code, not a lot. BUT this should have a great positive impact on performance, because now not the full object is copied onto the stack, but just a reference (pointer) to it.
I think it is a lot of work, to change all relevant class member functions, but I think it is worth the effort, if there are no negative side effects. What do you think?