Fixed clazy warnings: pass large objects by reference to const.

This commit is contained in:
Mat Sutcliffe
2018-12-17 16:43:54 +00:00
parent e40af8132c
commit 9f85a7b560
27 changed files with 49 additions and 47 deletions

View File

@@ -171,7 +171,7 @@ namespace BlackCoreTest
mutable ConnectGuard m_guard;
mutable std::function<void(const ExpectUnit *)> m_onDone;
void onDone(std::function<void(const ExpectUnit *)> callback) const { m_onDone = callback; }
void onDone(const std::function<void(const ExpectUnit *)> &callback) const { m_onDone = callback; }
// Helper traits class. Given T is a pointer-to-member-of-U, ClassOf<T>::type is U.
template <class T> struct ClassOf;