Commit 5ece687
authored
Fix use of deleted assignment operator for gDirectory under ROOT 6.24 in StFwdTrackMaker (#757)
Replaced `gDirectory = prevDir` with `prevDir->cd()` to avoid
compilation error with ROOT 6.24
```
.sl73_x8664_gcc485/OBJ/StRoot/StFwdTrackMaker/StFwdQAMaker.cxx: In member function 'virtual int StFwdQAMaker::Finish()':
.sl73_x8664_gcc485/OBJ/StRoot/StFwdTrackMaker/StFwdQAMaker.cxx:196:20: error: use of deleted function 'ROOT::Internal::TDirectoryAtomicAdapter& ROOT::Internal::TDirectoryAtomicAdapter::operator=(const ROOT::Internal::TDirectoryAtomicAdapter&)'
gDirectory = prevDir;
^
In file included from /cvmfs/star.sdcc.bnl.gov/star-spack/spack/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/root-6.24.06-ojgeqx4c6cazamrg2mltgfm3wpivwzyf/include/TDirectoryFile.h:25:0,
from /cvmfs/star.sdcc.bnl.gov/star-spack/spack/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/root-6.24.06-ojgeqx4c6cazamrg2mltgfm3wpivwzyf/include/TFile.h:28,
from StRoot/StChain/StMaker.h:20,
from StRoot/StFwdTrackMaker/StFwdQAMaker.h:11,
from .sl73_x8664_gcc485/OBJ/StRoot/StFwdTrackMaker/StFwdQAMaker.cxx:1:
/cvmfs/star.sdcc.bnl.gov/star-spack/spack/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/root-6.24.06-ojgeqx4c6cazamrg2mltgfm3wpivwzyf/include/TDirectory.h:247:11: note: 'ROOT::Internal::TDirectoryAtomicAdapter& ROOT::Internal::TDirectoryAtomicAdapter::operator=(const ROOT::Internal::TDirectoryAtomicAdapter&)' is implicitly deleted because the default definition would be ill-formed:
struct TDirectoryAtomicAdapter {
^
/cvmfs/star.sdcc.bnl.gov/star-spack/spack/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/root-6.24.06-ojgeqx4c6cazamrg2mltgfm3wpivwzyf/include/TDirectory.h:247:11: error: non-static reference member 'std::atomic<TDirectory*>& ROOT::Internal::TDirectoryAtomicAdapter::fValue', can't use default assignment operator
cons: *** [.sl73_x8664_gcc485/OBJ/StRoot/StFwdTrackMaker/StFwdQAMaker.o] Error 1
cons: errors constructing .sl73_x8664_gcc485/OBJ/StRoot/StFwdTrackMaker/StFwdQAMaker.o
```1 parent b26866e commit 5ece687
File tree
2 files changed
+6
-6
lines changed- StRoot
- StFwdTrackMaker
- StFwdUtils
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments