C4ScriptHost: add const proplist accessor

This accessor does not need to be virtual itself, because we don't want
people to override it; it calls the nonconst accessor anyway, which is
virtual.
liquid_container
Nicolas Hake 2016-04-23 17:15:03 +02:00
parent 96223f154c
commit baad3aef3c
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ public:
virtual bool LoadData(const char *szFilename, const char *szData, class C4LangStringTable *pLocalTable);
void Reg2List(C4AulScriptEngine *pEngine); // reg to linked list
virtual C4PropListStatic * GetPropList() { return 0; }
const C4PropListStatic *GetPropList() const { return const_cast<C4ScriptHost*>(this)->GetPropList(); }
const char *GetScript() const { return Script.getData(); }
bool IsReady() { return State == ASS_PARSED; } // whether script calls may be done
// Translate a string using the script's lang table