Skip to content

Commit 7a48645

Browse files
committed
[RF] Remove dead code in RooWorkspace::import()
The `RooWorkspace::import()` method has a block of dead code, iterating over a RooArgSet that is always empty. The code is dead at lest since ROOT 5: https://github.com/root-project/root/blob/v5-34-00-patches/roofit/roofitcore/src/RooWorkspace.cxx#L627
1 parent d07250d commit 7a48645

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

roofit/roofitcore/src/RooWorkspace.cxx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -623,22 +623,6 @@ bool RooWorkspace::import(const RooAbsArg& inArg,
623623
RooArgSet(*cloneTop).snapshot(cloneSet2, !noRecursion);
624624
RooAbsArg* cloneTop2 = cloneSet2.find(topName2.c_str()) ;
625625

626-
// Make final check list of conflicting nodes
627-
RooArgSet conflictNodes2 ;
628-
RooArgSet branchSet2 ;
629-
for (const auto branch2 : branchSet2) {
630-
if (_allOwnedNodes.find(branch2->GetName())) {
631-
conflictNodes2.add(*branch2) ;
632-
}
633-
}
634-
635-
// Terminate here if there are conflicts and no resolution protocol
636-
if (!conflictNodes2.empty()) {
637-
coutE(ObjectHandling) << "RooWorkSpace::import(" << GetName() << ") ERROR object named " << inArg.GetName() << ": component(s) "
638-
<< conflictNodes2 << " cause naming conflict after conflict resolution protocol was executed" << std::endl ;
639-
return true ;
640-
}
641-
642626
// Perform any auxiliary imports at this point
643627
for (const auto node : cloneSet2) {
644628
if (node->importWorkspaceHook(*this)) {

0 commit comments

Comments
 (0)