mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Define copy/move ctors and assignment ops
Delete special member functions where they are not used. (as part of applying suggestions from cppcoreguidelines-special-member-functions) These classes don't need to be copyable/movable: # copy/move not used: zmq:: TransportFactory, Socket, Message, UnmanagedRegion, Poller, Context shm:: TransportFactory, Socket, Message, UnmanagedRegion, Poller ofi:: TransportFactory, Socket, Message, Context shm:: ZMsg, Region, Monitor, TerminalConfig, Manager plugins:: Config, Control, TerminalConfig fairmq::StateQueue, StateMachine, ProgOptions, PluginServices, PluginManager, Plugin, Device, StateSubscription TestData, BadDevice, TestDevice (test suite heplers) # used via ptr interface: fairmq::UnmanagedRegion, TransportFactory, Socket, Poller, Message These classes need to be movable/copyable: MyClass (test suite helper), fairmq::Channel, fairmq::Parts
This commit is contained in:
committed by
Dennis Klein
parent
597d88277b
commit
ad824b4de1
@@ -119,9 +119,9 @@ auto ControlPluginProgramOptions() -> Plugin::ProgOptions
|
||||
return pluginOptions;
|
||||
}
|
||||
|
||||
struct terminal_config
|
||||
struct TerminalConfig
|
||||
{
|
||||
terminal_config()
|
||||
TerminalConfig()
|
||||
{
|
||||
termios t;
|
||||
tcgetattr(STDIN_FILENO, &t); // get the current terminal I/O structure
|
||||
@@ -130,7 +130,12 @@ struct terminal_config
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &t); // apply the new settings
|
||||
}
|
||||
|
||||
~terminal_config()
|
||||
TerminalConfig(const TerminalConfig&) = delete;
|
||||
TerminalConfig(TerminalConfig&&) = delete;
|
||||
TerminalConfig& operator=(const TerminalConfig&) = delete;
|
||||
TerminalConfig& operator=(TerminalConfig&&) = delete;
|
||||
|
||||
~TerminalConfig()
|
||||
{
|
||||
termios t;
|
||||
tcgetattr(STDIN_FILENO, &t); // get the current terminal I/O structure
|
||||
@@ -150,7 +155,7 @@ try {
|
||||
cinfd[0].events = POLLIN;
|
||||
cinfd[0].revents = 0;
|
||||
|
||||
terminal_config tconfig;
|
||||
TerminalConfig tconfig;
|
||||
|
||||
bool color = GetProperty<bool>("color");
|
||||
|
||||
|
@@ -28,6 +28,10 @@ class Control : public Plugin
|
||||
{
|
||||
public:
|
||||
Control(const std::string& name, Plugin::Version version, const std::string& maintainer, const std::string& homepage, PluginServices* pluginServices);
|
||||
Control(const Control&) = delete;
|
||||
Control(Control&&) = delete;
|
||||
Control& operator=(const Control&) = delete;
|
||||
Control& operator=(Control&&) = delete;
|
||||
|
||||
~Control();
|
||||
|
||||
|
Reference in New Issue
Block a user