From 086658799d207a98bbcb9bbd726991b62abc70da Mon Sep 17 00:00:00 2001 From: stephena Date: Mon, 17 Nov 2014 01:50:19 +0000 Subject: [PATCH] It looks like I can use std::function in expressions after all (keeping in mind that YACC stuff deals strictly in pointers, and can't be changed). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3081 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/DebuggerExpressions.hxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/debugger/DebuggerExpressions.hxx b/src/debugger/DebuggerExpressions.hxx index fc9d96d32..074fcea7d 100644 --- a/src/debugger/DebuggerExpressions.hxx +++ b/src/debugger/DebuggerExpressions.hxx @@ -20,6 +20,8 @@ #ifndef DEBUGGER_EXPRESSIONS_HXX #define DEBUGGER_EXPRESSIONS_HXX +#include + #include "bspf.hxx" #include "CartDebug.hxx" #include "CpuDebug.hxx" @@ -104,10 +106,10 @@ class CpuMethodExpression : public Expression public: CpuMethodExpression(CpuMethod method) : Expression(), myMethod(method) { } uInt16 evaluate() const - { return (Debugger::debugger().cpuDebug().*myMethod)(); } + { return myMethod(Debugger::debugger().cpuDebug()); } private: - CpuMethod myMethod; + std::function myMethod; }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -286,10 +288,10 @@ class CartMethodExpression : public Expression public: CartMethodExpression(CartMethod method) : Expression(), myMethod(method) { } uInt16 evaluate() const - { return (Debugger::debugger().cartDebug().*myMethod)(); } + { return myMethod(Debugger::debugger().cartDebug()); } private: - CartMethod myMethod; + std::function myMethod; }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -316,10 +318,10 @@ class TiaMethodExpression : public Expression public: TiaMethodExpression(TiaMethod method) : Expression(), myMethod(method) { } uInt16 evaluate() const - { return (Debugger::debugger().tiaDebug().*myMethod)(); } + { return myMethod(Debugger::debugger().tiaDebug()); } private: - TiaMethod myMethod; + std::function myMethod; }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -