diff --git a/src/drivers/Qt/QtScriptManager.cpp b/src/drivers/Qt/QtScriptManager.cpp index 680f6efc..38958847 100644 --- a/src/drivers/Qt/QtScriptManager.cpp +++ b/src/drivers/Qt/QtScriptManager.cpp @@ -206,11 +206,11 @@ QString EmuScriptObject::getDir() //---------------------------------------------------- static void addressReadCallback(unsigned int address, unsigned int value, void *userData) { - const MemoryScriptObject* mem = static_cast(userData); + MemoryScriptObject* mem = static_cast(userData); if (mem != nullptr) { - const QJSValue* func = mem->getReadFunc(address); + QJSValue* func = mem->getReadFunc(address); if (func != nullptr) { @@ -223,11 +223,11 @@ static void addressReadCallback(unsigned int address, unsigned int value, void * //---------------------------------------------------- static void addressWriteCallback(unsigned int address, unsigned int value, void *userData) { - const MemoryScriptObject* mem = static_cast(userData); + MemoryScriptObject* mem = static_cast(userData); if (mem != nullptr) { - const QJSValue* func = mem->getWriteFunc(address); + QJSValue* func = mem->getWriteFunc(address); if (func != nullptr) { @@ -240,11 +240,11 @@ static void addressWriteCallback(unsigned int address, unsigned int value, void //---------------------------------------------------- static void addressExecCallback(unsigned int address, unsigned int value, void *userData) { - const MemoryScriptObject* mem = static_cast(userData); + MemoryScriptObject* mem = static_cast(userData); if (mem != nullptr) { - const QJSValue* func = mem->getExecFunc(address); + QJSValue* func = mem->getExecFunc(address); if (func != nullptr) { diff --git a/src/drivers/Qt/QtScriptManager.h b/src/drivers/Qt/QtScriptManager.h index 2c270c2a..82a0de16 100644 --- a/src/drivers/Qt/QtScriptManager.h +++ b/src/drivers/Qt/QtScriptManager.h @@ -80,9 +80,9 @@ public: void setDialog(QScriptDialog_t* _dialog){ dialog = _dialog; } void reset(); - const QJSValue* getReadFunc(int address) const { return readFunc[address]; } - const QJSValue* getWriteFunc(int address) const { return writeFunc[address]; } - const QJSValue* getExecFunc(int address) const { return execFunc[address]; } + QJSValue* getReadFunc(int address) { return readFunc[address]; } + QJSValue* getWriteFunc(int address) { return writeFunc[address]; } + QJSValue* getExecFunc(int address) { return execFunc[address]; } private: static constexpr int AddressRange = 0x10000; QJSEngine* engine = nullptr;