diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-10-22 19:14:07 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-10-22 19:14:07 +0100 |
commit | d66cd676a299d839cf509f2267115e3d28d291ba (patch) | |
tree | e4af379ceef4499910cf137404d948485a1a2e21 /ui | |
parent | Rename shadowing variable (diff) | |
download | ilt-d66cd676a299d839cf509f2267115e3d28d291ba.tar.bz2 ilt-d66cd676a299d839cf509f2267115e3d28d291ba.tar.xz ilt-d66cd676a299d839cf509f2267115e3d28d291ba.zip |
Add explicit constructor to Mode to initialise target
Diffstat (limited to 'ui')
-rw-r--r-- | ui/modeHelper.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/modeHelper.hpp b/ui/modeHelper.hpp index 508beed..77707f2 100644 --- a/ui/modeHelper.hpp +++ b/ui/modeHelper.hpp @@ -6,6 +6,8 @@ union SDL_Event; enum ModeSecondClick { Unset, Reset, NoAction }; template<typename Target, ModeSecondClick msc = ModeSecondClick::Unset> class Mode { public: + explicit Mode(Target & t) : target {t} { } + Target & target; template<typename Mode, typename... Params> |