diff options
Diffstat (limited to 'fpdfsdk/javascript/JS_Define.h')
-rw-r--r-- | fpdfsdk/javascript/JS_Define.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h index 1c688d2c11..17dd8e9c70 100644 --- a/fpdfsdk/javascript/JS_Define.h +++ b/fpdfsdk/javascript/JS_Define.h @@ -70,8 +70,7 @@ struct JSMethodSpec { } \ ; // NOLINT -template <class C, - FX_BOOL (C::*M)(IJS_Context*, CJS_PropValue&, CFX_WideString&)> +template <class C, bool (C::*M)(IJS_Context*, CJS_PropValue&, CFX_WideString&)> void JSPropGetter(const char* prop_name_string, const char* class_name_string, v8::Local<v8::String> property, @@ -94,8 +93,7 @@ void JSPropGetter(const char* prop_name_string, info.GetReturnValue().Set(value.GetJSValue()->ToV8Value(pRuntime)); } -template <class C, - FX_BOOL (C::*M)(IJS_Context*, CJS_PropValue&, CFX_WideString&)> +template <class C, bool (C::*M)(IJS_Context*, CJS_PropValue&, CFX_WideString&)> void JSPropSetter(const char* prop_name_string, const char* class_name_string, v8::Local<v8::String> property, @@ -132,10 +130,10 @@ void JSPropSetter(const char* prop_name_string, } template <class C, - FX_BOOL (C::*M)(IJS_Context*, - const std::vector<CJS_Value>&, - CJS_Value&, - CFX_WideString&)> + bool (C::*M)(IJS_Context*, + const std::vector<CJS_Value>&, + CJS_Value&, + CFX_WideString&)> void JSMethod(const char* method_name_string, const char* class_name_string, const v8::FunctionCallbackInfo<v8::Value>& info) { @@ -357,7 +355,7 @@ void JSSpecialPropQuery(const char*, CJS_Object* pJSObj = static_cast<CJS_Object*>(pRuntime->GetObjectPrivate(info.Holder())); Alt* pObj = reinterpret_cast<Alt*>(pJSObj->GetEmbedObject()); - FX_BOOL bRet = pObj->QueryProperty(propname.c_str()); + bool bRet = pObj->QueryProperty(propname.c_str()); info.GetReturnValue().Set(bRet ? 4 : 0); } @@ -433,10 +431,10 @@ void JSSpecialPropDel(const char* class_name, } } -template <FX_BOOL (*F)(IJS_Context*, - const std::vector<CJS_Value>&, - CJS_Value&, - CFX_WideString&)> +template <bool (*F)(IJS_Context*, + const std::vector<CJS_Value>&, + CJS_Value&, + CFX_WideString&)> void JSGlobalFunc(const char* func_name_string, const v8::FunctionCallbackInfo<v8::Value>& info) { CJS_Runtime* pRuntime = |