codeTemplates/BC: Updated constructors to disallow copy without setting internal field reference
This commit is contained in:
@ -74,7 +74,7 @@ CONSTRUCT
|
||||
:
|
||||
PARENT(p, iF),
|
||||
scalarData_(dict.lookup<scalar>("scalarData")),
|
||||
data_(pTraits<TYPE>(dict.lookup("data"))),
|
||||
data_(dict.lookup<TYPE>("data")),
|
||||
fieldData_("fieldData", dict, p.size()),
|
||||
timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
|
||||
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
|
||||
@ -121,24 +121,6 @@ CONSTRUCT
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::CLASS::
|
||||
CONSTRUCT
|
||||
(
|
||||
const CLASS& ptf
|
||||
)
|
||||
:
|
||||
PARENT(ptf),
|
||||
scalarData_(ptf.scalarData_),
|
||||
data_(ptf.data_),
|
||||
fieldData_(ptf.fieldData_),
|
||||
timeVsData_(ptf.timeVsData_, false),
|
||||
wordData_(ptf.wordData_),
|
||||
labelData_(-1),
|
||||
boolData_(ptf.boolData_)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::CLASS::
|
||||
CONSTRUCT
|
||||
|
||||
@ -161,16 +161,7 @@ public:
|
||||
CONSTRUCT
|
||||
(
|
||||
const CLASS&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<FVPATCHF> clone() const
|
||||
{
|
||||
return tmp<FVPATCHF>
|
||||
(
|
||||
new CLASS(*this)
|
||||
);
|
||||
}
|
||||
) = delete;
|
||||
|
||||
//- Copy constructor setting internal field reference
|
||||
CONSTRUCT
|
||||
|
||||
Reference in New Issue
Block a user