[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:
@@ -30,11 +30,13 @@
|
||||
#include <nfsc/libnfs-raw-nfs.h>
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
|
||||
bool
|
||||
IsFileNotFound(std::exception_ptr ep) noexcept
|
||||
{
|
||||
try {
|
||||
std::rethrow_exception(ep);
|
||||
std::rethrow_exception(std::move(ep));
|
||||
} catch (const std::system_error &e) {
|
||||
return IsFileNotFound(e);
|
||||
#ifdef ENABLE_CURL
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void Failed(std::exception_ptr e) {
|
||||
void Failed(const std::exception_ptr& e) {
|
||||
SetInput(std::make_unique<FailingInputStream>(GetURI(), e,
|
||||
mutex));
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
static constexpr Domain tidal_domain("tidal");
|
||||
|
||||
@@ -77,7 +78,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void Failed(std::exception_ptr e) {
|
||||
void Failed(const std::exception_ptr& e) {
|
||||
SetInput(std::make_unique<FailingInputStream>(GetURI(), e,
|
||||
mutex));
|
||||
}
|
||||
@@ -133,7 +134,7 @@ static bool
|
||||
IsInvalidSession(std::exception_ptr e) noexcept
|
||||
{
|
||||
try {
|
||||
std::rethrow_exception(e);
|
||||
std::rethrow_exception(std::move(e));
|
||||
} catch (const TidalError &te) {
|
||||
return te.IsInvalidSession();
|
||||
} catch (...) {
|
||||
|
||||
Reference in New Issue
Block a user