From 033792078cd904d79c0d1ca0a31db10626d1a145 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 19 Feb 2017 11:31:58 +0200 Subject: [PATCH] Fixed compilation with GCC/Clang src/menu/messagebox.cpp:70:95: error: no viable conversion from 'hfunc' (aka 'void (*)()') to 'VMValue' --- src/menu/messagebox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index 8cbaa3e24..795bb60e4 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -67,7 +67,7 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode, { auto c = PClass::FindClass("MessageBoxMenu"); 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(handler) }; auto f = dyn_cast(c->Symbols.FindSymbol("Init", false)); GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0);