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

@@ -25,6 +25,8 @@ class FairMQMessageNN : public FairMQMessage
FairMQMessageNN();
FairMQMessageNN(size_t size);
FairMQMessageNN(void* data, size_t size, fairmq_free_fn *ffn = NULL, void* hint = NULL);
FairMQMessageNN(const FairMQMessageNN&) = delete;
FairMQMessageNN operator=(const FairMQMessageNN&) = delete;
virtual void Rebuild();
virtual void Rebuild(size_t size);
@@ -50,10 +52,6 @@ class FairMQMessageNN : public FairMQMessage
bool fReceiving;
void Clear();
/// Copy Constructor
FairMQMessageNN(const FairMQMessageNN&);
FairMQMessageNN operator=(const FairMQMessageNN&);
};
#endif /* FAIRMQMESSAGENN_H_ */

View File

@@ -33,6 +33,8 @@ class FairMQPollerNN : public FairMQPoller
public:
FairMQPollerNN(const std::vector<FairMQChannel>& channels);
FairMQPollerNN(std::unordered_map<std::string, std::vector<FairMQChannel>>& channelsMap, std::initializer_list<std::string> channelList);
FairMQPollerNN(const FairMQPollerNN&) = delete;
FairMQPollerNN operator=(const FairMQPollerNN&) = delete;
virtual void Poll(const int timeout);
virtual bool CheckInput(const int index);
@@ -49,10 +51,6 @@ class FairMQPollerNN : public FairMQPoller
int fNumItems;
std::unordered_map<std::string, int> fOffsetMap;
/// Copy Constructor
FairMQPollerNN(const FairMQPollerNN&);
FairMQPollerNN operator=(const FairMQPollerNN&);
};
#endif /* FAIRMQPOLLERNN_H_ */

View File

@@ -27,6 +27,8 @@ class FairMQSocketNN : public FairMQSocket
{
public:
FairMQSocketNN(const std::string& type, const std::string& name, int numIoThreads); // numIoThreads is not used in nanomsg.
FairMQSocketNN(const FairMQSocketNN&) = delete;
FairMQSocketNN operator=(const FairMQSocketNN&) = delete;
virtual std::string GetId();
@@ -67,10 +69,6 @@ class FairMQSocketNN : public FairMQSocket
unsigned long fBytesRx;
unsigned long fMessagesTx;
unsigned long fMessagesRx;
/// Copy Constructor
FairMQSocketNN(const FairMQSocketNN&);
FairMQSocketNN operator=(const FairMQSocketNN&);
};
#endif /* FAIRMQSOCKETNN_H_ */