Commit 359e187
committed
[core] Make TDirectory::Append tolerant to identical objects.
When calling TDirectory::Append(obj, replace=true), and obj is already
in the directory, return without doing anything.
If obj has the same name as an existing object, but is physically
different, the usual warning is raised.
This will enable workflows such as:
auto h = new TH1D(...);
directory->Append(h, true);
After this change, the above lines work both with and without auto
registration to gDirectory. This is needed to prepare ROOT for working
without auto registration.1 parent 7a9298c commit 359e187
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
0 commit comments