diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-06 13:23:44 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-10 11:19:22 +0200 |
commit | 03c5a15199b34b564314ac222d51ab687fc97a93 (patch) | |
tree | c130aa8785dc273090dbe0f3fa04e5055d851483 /logic | |
parent | 632cd5bf7778cb9062633f8d27ecd6aadcaa5d28 (diff) |
get rid of the silly mem -> shared_ptr alias
Diffstat (limited to 'logic')
-rw-r--r-- | logic/selected-libraries.hpp | 11 | ||||
-rw-r--r-- | logic/state.hpp | 2 | ||||
-rw-r--r-- | logic/work.cpp | 2 | ||||
-rw-r--r-- | logic/work.hpp | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/logic/selected-libraries.hpp b/logic/selected-libraries.hpp index 689cbec3..65e9733e 100644 --- a/logic/selected-libraries.hpp +++ b/logic/selected-libraries.hpp @@ -15,11 +15,14 @@ struct OTR_LOGIC_EXPORT SelectedLibraries { - using dylibptr = mem<dylib>; - mem<ITracker> pTracker; - mem<IFilter> pFilter; - mem<IProtocol> pProtocol; + using dylibptr = std::shared_ptr<dylib>; + + std::shared_ptr<ITracker> pTracker; + std::shared_ptr<IFilter> pFilter; + std::shared_ptr<IProtocol> pProtocol; + SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f); SelectedLibraries() : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) {} + bool correct; }; diff --git a/logic/state.hpp b/logic/state.hpp index f5892557..8bef71ad 100644 --- a/logic/state.hpp +++ b/logic/state.hpp @@ -26,5 +26,5 @@ struct State Modules modules; main_settings s; Mappings pose; - mem<Work> work; + std::shared_ptr<Work> work; }; diff --git a/logic/work.cpp b/logic/work.cpp index 7b9e550e..6829e62b 100644 --- a/logic/work.cpp +++ b/logic/work.cpp @@ -60,7 +60,7 @@ std::shared_ptr<TrackLogger> Work::make_logger(main_settings &s) } -Work::Work(Mappings& m, QFrame* frame, mem<dylib> tracker_, mem<dylib> filter_, mem<dylib> proto_) : +Work::Work(Mappings& m, QFrame* frame, std::shared_ptr<dylib> tracker_, std::shared_ptr<dylib> filter_, std::shared_ptr<dylib> proto_) : libs(frame, tracker_, filter_, proto_), logger(make_logger(s)), tracker(std::make_shared<Tracker>(m, libs, *logger)), diff --git a/logic/work.hpp b/logic/work.hpp index f1d5e401..dc32536c 100644 --- a/logic/work.hpp +++ b/logic/work.hpp @@ -35,7 +35,7 @@ struct OTR_LOGIC_EXPORT Work std::shared_ptr<Shortcuts> sc; std::vector<key_tuple> keys; - Work(Mappings& m, QFrame* frame, mem<dylib> tracker, mem<dylib> filter, mem<dylib> proto); + Work(Mappings& m, QFrame* frame, std::shared_ptr<dylib> tracker, std::shared_ptr<dylib> filter, std::shared_ptr<dylib> proto); ~Work(); void reload_shortcuts(); bool is_ok() const; |