summaryrefslogtreecommitdiffstats
path: root/src/input/inputEventHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/inputEventHandler.h')
-rw-r--r--src/input/inputEventHandler.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/input/inputEventHandler.h b/src/input/inputEventHandler.h
index 5b03a90..71a530b 100644
--- a/src/input/inputEventHandler.h
+++ b/src/input/inputEventHandler.h
@@ -176,7 +176,7 @@ struct InputEventHandlerPolicyBase
// The actual handler class need to provide doHandle and can override
// allow and isApplicable.
/////////////////////////////////////////////////////////////////////////
-/* interface */ class InputEventHandlerBase
+class InputEventHandlerBase
{
public:
enum HandlerStatus
@@ -246,9 +246,15 @@ private:
// Unfortunately, we cannot specialize member functions of a template.
// So, we need to make this a class with a static non-template member.
/////////////////////////////////////////////////////////////////////////
- template<bool Applicable, typename HandlerType>
+ template<bool Compatible, typename HandlerType>
struct ConditionallyAppend
{
+ /////////////////////////////////////////////////////////////////////////
+ // This method will never be instantiated for handlers that are
+ // not Compatible, thus generating no reference to HandlerType
+ // and permitting compilation to proceed without
+ // tedious nested preprocessor conditionals.
+ /////////////////////////////////////////////////////////////////////////
static void doIt(InputEventHandlerChain* chain)
{
chain->handlers.append(new HandlerType);