Use references instead of copies of SRWBackend

As the DCB passed as the clientReply parameter is guaranteed to match one
of the DCBs in the RWBackends. By using a reference, the need to copy a
shared_ptr is removed (along with the atomic operation that it implies)
thus reducing the overhead in the clientReply and the functions it uses.
This commit is contained in:
Markus Mäkelä
2017-10-06 11:34:33 +03:00
committed by Johan Wikman
parent a6eeed98fe
commit ecb56ef540
3 changed files with 39 additions and 39 deletions

View File

@ -291,7 +291,7 @@ void closed_session_reply(GWBUF *querybuf)
* @param buffer Query buffer containing reply data
* @param backend Router session data for a backend server
*/
void check_session_command_reply(GWBUF *buffer, SRWBackend backend)
void check_session_command_reply(GWBUF *buffer, SRWBackend& backend)
{
if (MYSQL_IS_ERROR_PACKET(((uint8_t *)GWBUF_DATA(buffer))))
{