diff --git a/src/OpenFOAM/memory/Xfer/Xfer.H b/src/OpenFOAM/memory/Xfer/Xfer.H index 19a67c7af3..5d956a6e7f 100644 --- a/src/OpenFOAM/memory/Xfer/Xfer.H +++ b/src/OpenFOAM/memory/Xfer/Xfer.H @@ -41,7 +41,7 @@ Description xferMoveTo() functions can prove useful. An example is transferring from a DynamicList to a List. Since the List\::transfer(List\&) 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\::transfer(DynamicList\&) method. @code @@ -50,6 +50,16 @@ Description labelList plainLst( xferMoveTo(dynLst) ); @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