Passing object by reference instead of by valueamule-svn-r11046
commit7340ae6094b7f8a3b8ddaa4b6669f9871e294d32
authorupstream svn <svn@amule.org>
Tue, 2 Jun 2020 00:45:32 +0000 (2 00:45 +0000)
committerDévai Tamás <gonosztopi@amule.org>
Tue, 2 Jun 2020 01:13:02 +0000 (2 01:13 +0000)
tree7a6681e39debc2118ebd27aeec0bcf8b4048c450
parent66f98e93068d43e1628a87d6e18997b2570e31fc
Passing object by reference instead of by value

Passing an object by reference is much faster than passing by value, because in the latter case a temporary object (which will be passed as argument to the function call) needs to be constructed from the original and destructed after the function call ends. Using a const reference ensures that the original object cannot be changed inside the function call (just as with the pass-by-value semantics).

This commit is a merge of pull request #190.
.svn-revision
src/webserver/src/php_amule_lib.cpp
src/webserver/src/php_syntree.cpp
src/webserver/src/php_syntree.h