Skip to content

Commit

Permalink
Collapse if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
pcanal committed Mar 20, 2019
1 parent 9f7307b commit 469ef92
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tree/tree/src/TBranchElement.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5458,21 +5458,21 @@ void TBranchElement::SetActionSequence(TClass *originalClass, TStreamerInfo *loc

if (!isSplitNode)
fNewIDs.erase(fNewIDs.begin());
else if (fType != 3 && fType != 4) {

else if (fInitOffsets && fType != 3 && fType != 4) {
// fObject has the address of the sub-object but the streamer action have
// offset relative to the parent.

// Note: We skipped this for the top node of split collection because the
// sequence is about the content, we need to review what happens where an
// action related to the collection itself will land.
TBranchElement *parent = dynamic_cast<TBranchElement*>(GetMother()->GetSubBranch(this));
if (fInitOffsets) {
auto index = parent->fBranches.IndexOf(this);
if (index >= 0) {
actionSequence->AddToOffset( - parent->fBranchOffset[index] );
}
} // else it will be done by InitOffsets
}

auto index = parent->fBranches.IndexOf(this);
if (index >= 0) {
actionSequence->AddToOffset( - parent->fBranchOffset[index] );
}
} // else it will be done by InitOffsets
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 469ef92

Please sign in to comment.