changed pointer stuff

This commit is contained in:
Neeflix
2018-08-08 11:16:19 +02:00
parent 0c08b940f3
commit 844847edca
12 changed files with 56 additions and 36 deletions

View File

@@ -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;
}
}