Skip to content

Commit 4bd3b80

Browse files
committed
revert AbstractDFG changes
will rather do it in a seperate commit with exists for compatibility
1 parent 9792ed3 commit 4bd3b80

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/services/AbstractDFG.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ function _copyIntoGraph!(sourceDFG::G, destDFG::H, variableFactorLabels::Vector{
4242

4343
# Now we have to add all variables first,
4444
for variable in sourceVariables
45-
if !haskey(destDFG.labelDict, variable.label)
46-
addVariable!(destDFG, deepcopy(variable))
47-
end
45+
addVariable!(destDFG, deepcopy(variable))
4846
end
4947
# And then all factors to the destDFG.
5048
for factor in sourceFactors
@@ -59,9 +57,7 @@ function _copyIntoGraph!(sourceDFG::G, destDFG::H, variableFactorLabels::Vector{
5957
end
6058
# Only if we have all of them should we add it (otherwise strange things may happen on evaluation)
6159
if includeOrphanFactors || length(factVariableIds) == length(sourceFactorVariableIds)
62-
if !haskey(destDFG.labelDict, factor.label)
63-
addFactor!(destDFG, factVariableIds, deepcopy(factor))
64-
end
60+
addFactor!(destDFG, factVariableIds, deepcopy(factor))
6561
end
6662
end
6763
return nothing

0 commit comments

Comments
 (0)