refactoring
This commit is contained in:
@@ -22,7 +22,7 @@ class InputFactory
|
||||
{
|
||||
|
||||
public:
|
||||
static Detector* get_detector(std::string& input_config_path, std::string& matrix_config_path)
|
||||
static std::shared_ptr<Detector> get_detector(std::string& input_config_path, std::string& matrix_config_path)
|
||||
{
|
||||
std::ifstream input_config_stream(input_config_path);
|
||||
json input_config;
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
std::vector<InputEvent> input_events = create_input_events(matrix_config);
|
||||
|
||||
return new Detector(input_config, input_events);
|
||||
return std::shared_ptr<Detector>(Detector(input_config, input_events));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user