Commit 636d2688 authored by Andrew Heather's avatar Andrew Heather
Browse files

COMP: corrected code removed in 51c2329f

parent bcc1a499
......@@ -67,8 +67,13 @@ Foam::TimeFunction1<Type>::TimeFunction1
:
time_(rhs.time_),
name_(rhs.name_),
entry_(rhs.entry_) // steal/reuse (missing clone!)
{}
entry_(nullptr) // steal/reuse (missing clone!)
{
if (rhs.entry_)
{
entry_.reset(rhs.entry_->clone().ptr());
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
......
  • I now remember that one. Had issues with some Function1 not having a clone method if the constructor had the following:

    entry_(rhs.entry_.clone())

    Should theoretically be the same as the if (...) { ... } code, but wasn't.

  • mentioned in issue #1726

    Toggle commit list
Supports Markdown
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