Re: dpnet: Implement IDirectPlay8Address GetComponentByIndex
Nov. 26, 2014
11:24 p.m.
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.
4136
Age (days ago)
4136
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Sivov