From 92dcc964b79e785f2821cf08e3cc6514d71e6569 Mon Sep 17 00:00:00 2001 From: GTNardy Date: Sat, 19 Dec 2020 06:30:18 -0300 Subject: [PATCH] Add ultralight:: to BindJSCallback functions If you are not `using namespace ultralight` you won't be able to call those MACROS. With this small addition it will be possible and free of compatibility issues. --- AppCore/JSHelpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppCore/JSHelpers.h b/AppCore/JSHelpers.h index 3e6eec1..31ea84a 100644 --- a/AppCore/JSHelpers.h +++ b/AppCore/JSHelpers.h @@ -318,7 +318,7 @@ typedef std::function JSCallbackWithRet /// **Note**: Expected to run from within an instance of 'MyClass', note the /// 'this' keyword in the macro. /// -#define BindJSCallback(fn) (JSCallback)std::bind(fn, this, std::placeholders::_1, std::placeholders::_2) +#define BindJSCallback(fn) (ultralight::JSCallback)std::bind(fn, this, std::placeholders::_1, std::placeholders::_2) /// /// Macro to help bind C++ member functions to a JSCallbackWithRetval @@ -328,7 +328,7 @@ typedef std::function JSCallbackWithRet /// **Note**: Expected to run from within an instance of 'MyClass', note the /// 'this' keyword in the macro. /// -#define BindJSCallbackWithRetval(fn) (JSCallbackWithRetval)std::bind(fn, this, std::placeholders::_1, std::placeholders::_2) +#define BindJSCallbackWithRetval(fn) (ultralight::JSCallbackWithRetval)std::bind(fn, this, std::placeholders::_1, std::placeholders::_2) /// /// Wrapper for JSObject property value (JSValue subclass). Allows new value assignment