Commit b31e671a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Use return_bool in more places.

parent 6010e6b8
......@@ -937,11 +937,7 @@ static HRESULT Global_IsDate(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt,
{
TRACE("%s\n", debugstr_variant(arg));
if(res) {
V_VT(res) = VT_BOOL;
V_BOOL(res) = V_VT(arg) == VT_DATE ? VARIANT_TRUE : VARIANT_FALSE;
}
return S_OK;
return return_bool(res, V_VT(arg) == VT_DATE);
}
static HRESULT Global_IsEmpty(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......@@ -949,12 +945,7 @@ static HRESULT Global_IsEmpty(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt
TRACE("(%s)\n", debugstr_variant(arg));
assert(args_cnt == 1);
if(res) {
V_VT(res) = VT_BOOL;
V_BOOL(res) = V_VT(arg) == VT_EMPTY ? VARIANT_TRUE : VARIANT_FALSE;
}
return S_OK;
return return_bool(res, V_VT(arg) == VT_EMPTY);
}
static HRESULT Global_IsNull(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......@@ -963,11 +954,7 @@ static HRESULT Global_IsNull(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt,
assert(args_cnt == 1);
if(res) {
V_VT(res) = VT_BOOL;
V_BOOL(res) = V_VT(arg) == VT_NULL ? VARIANT_TRUE : VARIANT_FALSE;
}
return S_OK;
return return_bool(res, V_VT(arg) == VT_NULL);
}
static HRESULT Global_IsNumeric(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......@@ -999,11 +986,7 @@ static HRESULT Global_IsObject(BuiltinDisp *This, VARIANT *arg, unsigned args_cn
assert(args_cnt == 1);
if(res) {
V_VT(res) = VT_BOOL;
V_BOOL(res) = V_VT(arg) == VT_DISPATCH ? VARIANT_TRUE : VARIANT_FALSE;
}
return S_OK;
return return_bool(res, V_VT(arg) == VT_DISPATCH);
}
static HRESULT Global_Atn(BuiltinDisp *This, VARIANT *arg, unsigned args_cnt, VARIANT *res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment