Jacek Caban (@jacek) commented about dlls/oleaut32/variant.c:
+ VARIANT *other = leftvt == VT_NULL ? right : left; + + switch (V_VT(other)) + { + case VT_EMPTY: break; + case VT_I1: if (V_I1(other)) resvt = VT_NULL; break; + case VT_UI1: if (V_UI1(other)) resvt = VT_NULL; break; + case VT_I2: if (V_I2(other)) resvt = VT_NULL; break; + case VT_UI2: if (V_UI2(other)) resvt = VT_NULL; break; + case VT_I4: if (V_I4(other)) resvt = VT_NULL; break; + case VT_UI4: if (V_UI4(other)) resvt = VT_NULL; break; + case VT_I8: if (V_I8(other)) resvt = VT_NULL; break; + case VT_UI8: if (V_UI8(other)) resvt = VT_NULL; break; + case VT_INT: if (V_INT(other)) resvt = VT_NULL; break; + case VT_UINT: if (V_UINT(other)) resvt = VT_NULL; break; + case VT_BOOL: if (V_BOOL(other) != VARIANT_FALSE) resvt = VT_NULL; break; The explicit comparison to `VARIANT_FALSE` is redundant, `V_BOOL(other)` can be treated as a boolean value, like the existing code does.
If you wouldn't align to `VT_DECIMAL` case, the switch would be much more compact. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10673#note_138881