some json parsing error

This commit is contained in:
Jonas Zeunert
2018-09-14 01:11:05 +02:00
parent 7fbc907c8c
commit fb94424d4b
2 changed files with 4 additions and 4 deletions

View File

@@ -45,9 +45,9 @@ namespace Input {
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) {
for (auto &json_event : matrix_config) {
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) {
for (auto &json_event : matrix_config.at("input_matrix")) {
try {
std::string name = json_event.at("name");

View File

@@ -29,7 +29,7 @@ public:
static std::shared_ptr<IInputDriver> get_InputDriver(std::istream& input_config_stream, std::istream& matrix_config_stream);
private:
static void create_input_events(nlohmann::json matrix_config, std::map<char, std::shared_ptr<Event>> address_event_map, std::map<std::string, std::shared_ptr<Event>> name_event_map);
static void create_input_events(nlohmann::json matrix_config, std::map<char, std::shared_ptr<Event>>& address_event_map, std::map<std::string, std::shared_ptr<Event>>& name_event_map);
};
}
}