changed pointer stuff
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
namespace Input
|
||||
{
|
||||
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, Event> events, std::shared_ptr<IEventNotifier> event_notifier) :
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::map<char, std::shared_ptr<Event>> events, std::shared_ptr<IEventNotifier> event_notifier) :
|
||||
input_gpio_interface(std::move(input_gpio_interface)), events(events), is_running(true), event_notifier(event_notifier)
|
||||
{
|
||||
this->detect_thread = std::thread(&Detector::detect, this);
|
||||
@@ -40,7 +40,7 @@ void Detector::detect()
|
||||
{
|
||||
try
|
||||
{
|
||||
Event& event = events.at(address);
|
||||
auto event = events.at(address);
|
||||
event_notifier->distribute_event(event);
|
||||
}
|
||||
catch(std::out_of_range& e)
|
||||
@@ -64,6 +64,4 @@ bool Detector::check_inputs(char& address)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user