minor docu change

This commit is contained in:
Mark Olesen
2009-01-07 10:52:31 +01:00
parent c5b38a7232
commit e5205c8676

View File

@ -41,7 +41,7 @@ Description
xferMoveTo() functions can prove useful. An example is transferring xferMoveTo() functions can prove useful. An example is transferring
from a DynamicList to a List. Since the from a DynamicList to a List. Since the
List\<T\>::transfer(List\<T\>&) method could result in some allocated List\<T\>::transfer(List\<T\>&) method could result in some allocated
memory becoming inaccessible, the xferMoveTo() function can be used to memory becoming inaccessible, the xferMoveTo() function should be used to
invoke the correct List\<T\>::transfer(DynamicList\<T\>&) method. invoke the correct List\<T\>::transfer(DynamicList\<T\>&) method.
@code @code
@ -50,6 +50,16 @@ Description
labelList plainLst( xferMoveTo<labelList>(dynLst) ); labelList plainLst( xferMoveTo<labelList>(dynLst) );
@endcode @endcode
Of course, since this example is a very common operation, the
DynamicList::xfer() method transfers to a plain List anyhow.
It would thus be simpler (and clearer) just to use the following code:
@code
DynamicList<label> dynLst;
...
labelList plainLst(dynLst.xfer());
@endcode
SeeAlso SeeAlso
xferCopy, xferCopyTo, xferMove, xferMoveTo, xferTmp xferCopy, xferCopyTo, xferMove, xferMoveTo, xferTmp