[clang-tidy] convert several functions to const &

Found with performance-unnecessary-value-param

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-01-31 21:10:03 -08:00
parent 4b0444e760
commit 452c41b71f
12 changed files with 45 additions and 40 deletions

View File

@@ -82,7 +82,7 @@ ToAck(DatabaseErrorCode code) noexcept
gcc_pure
static enum ack
ToAck(std::exception_ptr ep) noexcept
ToAck(const std::exception_ptr& ep) noexcept
{
try {
std::rethrow_exception(ep);
@@ -113,7 +113,7 @@ ToAck(std::exception_ptr ep) noexcept
}
void
PrintError(Response &r, std::exception_ptr ep)
PrintError(Response &r, const std::exception_ptr& ep)
{
LogError(ep);
r.Error(ToAck(ep), GetFullMessage(ep).c_str());

View File

@@ -28,6 +28,6 @@ class Response;
* Send the exception to the client.
*/
void
PrintError(Response &r, std::exception_ptr ep);
PrintError(Response &r, const std::exception_ptr& ep);
#endif