Fix copy constructor & assignment operator warning in FairMQChannel

Fix Weffc++ warnings

  - Add missing copy constructors and assignment operators .
  - Hide the warning from FairMQStateMachine.h where it is produced by boost and/or is intended.
  - Some code cleanup.
This commit is contained in:
Alexey Rybalchenko
2016-01-06 13:52:24 +01:00
committed by Florian Uhlig
parent 9a0a8c7516
commit e4fed2fa1b
21 changed files with 133 additions and 104 deletions

View File

@@ -6,20 +6,18 @@
*/
#ifndef BASESINKPOLICY_H
#define BASESINKPOLICY_H
#define BASESINKPOLICY_H
#include <type_traits>
// CRTP base class
template <typename TDerived >
class BaseSinkPolicy
{
public:
BaseSinkPolicy()
{}
public:
BaseSinkPolicy() {}
virtual ~BaseSinkPolicy()
{}
virtual ~BaseSinkPolicy() {}
template<typename CONTAINER_TYPE, typename C = TDerived>
auto AddToFile(CONTAINER_TYPE container) -> decltype(static_cast<C*>(this)->AddToFile(container) )
@@ -34,8 +32,6 @@ public:
static_assert(std::is_same<C, TDerived>{}, "BaseSinkPolicy::InitOutputFile hack broken");
return static_cast<TDerived*>(this)->InitOutputFile();
}
};
#endif /* BASESINKPOLICY_H */
#endif /* BASESINKPOLICY_H */