waylandpp
waylandpp copied to clipboard
Excessive copying of wrapper instances
During debugging I noticed that for one call to a function that takes a waylandpp proxy_t as argument, around 5 copies of the proxy object were constructed and then destroyed again. While it might not matter much for performance, I think that it's unnecessary and also makes stepping through the code a lot harder. What do you think of using const references for the arguments in most places? I know that this won't completely get rid of copying probably, but it should save a few ones.
(I'm willing to write the patch, but I wanted to discuss this first.)
I have not spent very much time on optimisation, since my PhD thesis consumes most of my time at the moment. So as long as the existing examples don't need to get changed, I agree that const references are indeed a good idea. :)