changed to smart ptrs and trying to fix event_handler_tests
This commit is contained in:
@@ -31,7 +31,7 @@ class Detector : public IDetector
|
||||
{
|
||||
|
||||
public:
|
||||
Detector(IInputGPIOInterface* input_gpio_interface, std::map<char, Event> events, IEventNotifier* event_notifier);
|
||||
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, Event> events, std::shared_ptr<IEventNotifier> event_notifier);
|
||||
~Detector();
|
||||
|
||||
private:
|
||||
@@ -39,11 +39,11 @@ private:
|
||||
bool check_inputs(char& address);
|
||||
|
||||
private:
|
||||
IInputGPIOInterface* input_gpio_interface;
|
||||
std::unique_ptr<IInputGPIOInterface> input_gpio_interface;
|
||||
|
||||
std::map<char, Event> events;
|
||||
|
||||
IEventNotifier* event_notifier;
|
||||
std::shared_ptr<IEventNotifier> event_notifier;
|
||||
|
||||
bool is_running;
|
||||
std::thread detect_thread;
|
||||
|
||||
Reference in New Issue
Block a user