dpnet: Implement IDirectPlay8Address GetComponentByIndex

Nikolay Sivov bunglehead at gmail.com
Wed Nov 26 23:24:36 CST 2014


On 27.11.2014 8:11, Alistair Leslie-Hughes wrote:

> +    if(dwComponentID > list_count(&This->components))
> +        return DPNERR_DOESNOTEXIST;
> +
> +    LIST_FOR_EACH_ENTRY(entry, &This->components, struct component, entry)
> +    {
> +        if(count == dwComponentID)

This means you really want to use array instead of a list. This will 
speed up GetNumComponents() and GetComponentByIndex(), while 
GetComponentByName() will still need to iterate.



More information about the wine-devel mailing list