Skip to content
Snippets Groups Projects
  1. Oct 16, 2008
  2. Oct 15, 2008
  3. Oct 14, 2008
  4. Oct 13, 2008
  5. Oct 12, 2008
  6. Oct 10, 2008
    • Mark Olesen's avatar
      DynamicList - consistent setSize() behaviour · b770ddf3
      Mark Olesen authored
        - expansion of a list beyond the currently addressed list size
          changes both the allocated size and the addressed list size
      
        - contracting list below the currently addressed list size
          changes the addressed list size only.
      
        If someone really wishes to increase the underlying allocated list size
        without touching the addressed list size:
      
            prevSize = myList.size();
            myList.setSize(largerSize);
            myList.setSize(prevSize);
      
        or introduce an equivalent allocSize(const label) method if this is needed
      b770ddf3
    • Mark Olesen's avatar
      DynamicList - fixed setSize() semantics · b92ed1ec
      Mark Olesen authored
      setSize(const label)
        - When the new size is smaller than the addressed list size, the addressed
          list size is reduced and the allocated size does not change.
        - Otherwise the allocated size is adjusted, but the addressed list size
          does not change.
      
      setSize(const label, const T&)
        - When the new size is larger than the addressed list size, both allocated
          and addressed list sizes are adjusted.
      
      NOTE: it might be more consistent to have setSize(label) also adjust the
            addressed list size.  This also corresponds to what previous releases
            did, although I don't know if anyone has relied upon any particular
            behaviour
      b92ed1ec
    • Andrew Heather's avatar