some code convention stuff
This commit is contained in:
@@ -22,10 +22,8 @@ namespace FlippR_Driver
|
||||
{
|
||||
namespace Input
|
||||
{
|
||||
|
||||
std::shared_ptr<IInputDriver>
|
||||
InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream)
|
||||
{
|
||||
std::shared_ptr<IInputDriver> InputDriverFactory::get_InputDriver(std::istream &input_config_stream, std::istream &matrix_config_stream)
|
||||
{
|
||||
LoggerFactory::CreateInputLogger();
|
||||
|
||||
IBlockingQueue<Event> *event_queue = new BlockingQueue<Event>;
|
||||
@@ -43,13 +41,12 @@ namespace Input
|
||||
new Detector(std::move(input_gpio_interface), address_event_map, event_notifier));
|
||||
|
||||
return std::shared_ptr<InputDriver>(new InputDriver(event_notifier, std::move(detector), name_event_map));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InputDriverFactory::create_input_events(json matrix_config, std::map<char, std::shared_ptr<Event>>& address_event_map,
|
||||
void InputDriverFactory::create_input_events(json matrix_config, std::map<char, std::shared_ptr<Event>>& address_event_map,
|
||||
std::map<std::string, std::shared_ptr<Event>>& name_event_map)
|
||||
{
|
||||
{
|
||||
auto& event_array = matrix_config.at("input_matrix");
|
||||
for (auto &json_event : event_array)
|
||||
{
|
||||
@@ -65,11 +62,13 @@ namespace Input
|
||||
address_event_map.emplace(address, event_ptr);
|
||||
name_event_map.emplace(name, event_ptr);
|
||||
}
|
||||
catch (json::exception &e) {
|
||||
catch (json::exception &e)
|
||||
{
|
||||
CLOG(ERROR, INPUT_LOGGER) << "Matrix config-file corrupted: " << e.what();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user