Hans Leidekker : webservices: Simplify get_field_size.
Alexandre Julliard
julliard at winehq.org
Tue Oct 3 15:39:52 CDT 2017
Module: wine
Branch: master
Commit: a808821d722d7f7f1a6f351e6b639c963394167b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a808821d722d7f7f1a6f351e6b639c963394167b
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Oct 3 16:14:41 2017 +0200
webservices: Simplify get_field_size.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/webservices/reader.c | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index d767d5c..2ed9319 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -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 )
More information about the wine-cvs
mailing list