Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3866

Show
Ignore:
Timestamp:
08/09/08 17:05:02 (4 months ago)
Author:
kris
Message:

fixes #1231 :: LinkedList? doesn't allow iterating over empty list

thanks to humpolec

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/util/container/LinkedList.d

    r3713 r3866  
    150150        final Iterator iterator () 
    151151        { 
    152                 assert (list); 
    153  
    154152                Iterator i = void; 
    155153                i.mutation = mutation; 
    156                 i.node = *(i.hook = &list)
     154                i.node = list ? *(i.hook = &list) : null
    157155                i.prior = null; 
    158156                i.owner = this;