Commit a808821d authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Simplify get_field_size.

parent 160f5b23
......@@ -7311,28 +7311,8 @@ HRESULT get_param_desc( const WS_STRUCT_DESCRIPTION *desc, USHORT index, const W
static ULONG get_field_size( const WS_FIELD_DESCRIPTION *desc )
{
WS_READ_OPTION option;
ULONG size;
switch ((option = get_field_read_option( desc->type, desc->options )))
{
case WS_READ_REQUIRED_POINTER:
case WS_READ_OPTIONAL_POINTER:
case WS_READ_NILLABLE_POINTER:
size = sizeof(void *);
break;
case WS_READ_REQUIRED_VALUE:
case WS_READ_NILLABLE_VALUE:
size = get_type_size( desc->type, desc->typeDescription );
break;
default:
WARN( "unhandled option %u\n", option );
return 0;
}
return size;
if (desc->options & WS_FIELD_POINTER) return sizeof(void *);
return get_type_size( desc->type, desc->typeDescription );
}
static HRESULT read_param( struct reader *reader, const WS_FIELD_DESCRIPTION *desc, WS_HEAP *heap, void *ret )
......
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