summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-22 19:14:07 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-22 19:14:07 +0100
commitd66cd676a299d839cf509f2267115e3d28d291ba (patch)
treee4af379ceef4499910cf137404d948485a1a2e21 /ui
parentRename shadowing variable (diff)
downloadilt-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.hpp2
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>