Commit 4530a473 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: updates to Xfer after commit 49331bf9

parent d549a7a4
......@@ -83,7 +83,7 @@ PtrList<List<Type> > readFields
{
Info<< " reading field " << obj.name() << endl;
IOField<Type> newField(obj);
values.set(fieldI++, new List<Type>(newField.xfer()));
values.set(fieldI++, new List<Type>(newField.xferList()));
break;
}
}
......
......@@ -164,7 +164,7 @@ Field<Type>::Field(const Xfer<List<Type> >& f)
template<class Type>
Field<Type>::Field(const Xfer<Field<Type> >& f)
:
List<Type>(f)
List<Type>(f().xferList())
{}
......@@ -585,6 +585,13 @@ Xfer<Field<Type> > Field<Type>::xfer()
}
template<class Type>
Xfer<List<Type> > Field<Type>::xferList()
{
return List<Type>::xfer();
}
template<class Type>
void Field<Type>::writeEntry(const word& keyword, Ostream& os) const
{
......
......@@ -305,6 +305,9 @@ public:
//- Transfer contents to the Xfer container
Xfer<Field<Type> > xfer();
//- Transfer contents to a List Xfer container
Xfer<List<Type> > xferList();
//- Write the field as a dictionary entry
void writeEntry(const word& keyword, Ostream& os) const;
......
......@@ -117,7 +117,7 @@ bool Foam::fileFormats::STARCDCore::readPoints
// reuse memory if possible
DynamicList<point> dynPoints(points.xfer());
DynamicList<point> dynPoints(points.xferList());
DynamicList<label> dynPointId(ids.xfer()); // STAR-CD index of points
dynPoints.clear();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment