Fixed compilation with GCC/Clang

src/menu/messagebox.cpp:70:95: error: no viable conversion from 'hfunc' (aka 'void (*)()') to 'VMValue'
This commit is contained in:
alexey.lysiuk 2017-02-19 11:31:58 +02:00
parent c0dd37e16e
commit 033792078c

View file

@ -67,7 +67,7 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode,
{ {
auto c = PClass::FindClass("MessageBoxMenu"); auto c = PClass::FindClass("MessageBoxMenu");
auto p = c->CreateNew(); auto p = c->CreateNew();
VMValue params[] = { p, parent, FString(message), messagemode, playsound, action.GetIndex(), handler }; VMValue params[] = { p, parent, FString(message), messagemode, playsound, action.GetIndex(), reinterpret_cast<void*>(handler) };
auto f = dyn_cast<PFunction>(c->Symbols.FindSymbol("Init", false)); auto f = dyn_cast<PFunction>(c->Symbols.FindSymbol("Init", false));
GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0); GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0);