changed to moveconstruct
This commit is contained in:
@@ -21,9 +21,9 @@ public:
|
||||
~ILamp()
|
||||
{};
|
||||
|
||||
void activate();
|
||||
void deactivate();
|
||||
bool is_activated();
|
||||
virtual void activate() = 0;
|
||||
virtual void deactivate() = 0;
|
||||
virtual bool is_activated() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class ISolenoid
|
||||
public:
|
||||
~ISolenoid()
|
||||
{};
|
||||
void trigger();
|
||||
virtual void trigger() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace flippR_driver
|
||||
namespace input
|
||||
{
|
||||
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>> events) :
|
||||
input_gpio_interface(std::move(input_gpio_interface)), events(events), is_running(true)
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>>& events) :
|
||||
input_gpio_interface(std::move(input_gpio_interface)), events(std::move(events)), is_running(true)
|
||||
{
|
||||
this->detect_thread = std::thread(&Detector::detect, this);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class Detector : public IDetector
|
||||
{
|
||||
|
||||
public:
|
||||
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>> events);
|
||||
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>>& events);
|
||||
~Detector();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user