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

Changeset 2898

Show
Ignore:
Timestamp:
11/19/07 23:04:55 (1 year ago)
Author:
kris
Message:

removed Seek.position() since it can be simulated via seek() and clashes with similarly named methods in other classes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/io/MappedBuffer.d

    r2891 r2898  
    217217        ***********************************************************************/ 
    218218 
    219         uint seek (uint offset, IConduit.Seek.Anchor anchor
     219        long seek (long offset, Anchor anchor = Anchor.Begin
    220220        { 
    221221                uint pos = dimension; 
    222222 
    223                 if (anchor is IConduit.Seek.Anchor.Begin) 
    224                     pos = offset; 
     223                if (anchor is Anchor.Begin) 
     224                    pos = cast(uint) offset; 
    225225                else 
    226                    if (anchor is IConduit.Seek.Anchor.End) 
    227                        pos -= offset; 
     226                   if (anchor is Anchor.End) 
     227                       pos -= cast(uint) offset; 
    228228                   else 
    229                       pos = index + offset; 
     229                      pos = index + cast(uint) offset; 
    230230 
    231231                return index = pos; 
     
    321321        } 
    322322} 
     323 
     324 
     325debug (MappedBuffer) 
     326{ 
     327        void main() 
     328        { 
     329                auto x = new MappedBuffer(null); 
     330        } 
     331} 
  • trunk/tango/io/model/IConduit.d

    r2888 r2898  
    110110 
    111111                /*************************************************************** 
    112                          
    113                         Return current conduit position (e.g. file position) 
    114                  
    115                 ***************************************************************/ 
    116  
    117                 long position (); 
    118  
    119                 /*************************************************************** 
    120112                 
    121113                        Move the file position to the given offset from the