browsermt / mts

Marian Translation Service
Apache License 2.0
18 stars 4 forks source link

Avoid passing complicated objects by value if you can #13

Closed kpu closed 3 years ago

kpu commented 3 years ago

This should have been passed by reference.
https://github.com/browsermt/mts/blob/41978b4c225138432883a8c1abc98e7a86a31c2c/src/bergamot/request.cpp#L11

Also, it's not even clear what this is used for.

jerinphilip commented 3 years ago

https://github.com/browsermt/mts/blob/b30809f0af85760a701cde7f2d5910b0b6b74abd/src/bergamot/request.h#L50

https://github.com/browsermt/mts/blob/b30809f0af85760a701cde7f2d5910b0b6b74abd/src/bergamot/request.cpp#L13-L20

I understand the need to add variable names, will be done in a separate commit.