Skip to content

Commit c11464f

Browse files
ferdymercurydpiparo
authored andcommitted
[tree] rename bit to avoid confusion with const TFile
as suggested by pcanal
1 parent 05eb298 commit c11464f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

io/io/inc/TFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class TFile : public TDirectoryFile {
277277
// Set this bit to block an unwanted automatic call to TTree::ChangeFile
278278
// e.g. during TFileMerger operations (bypassing any set MaxTreeSize)
279279
// This is a transient bit and has no relevance for I/O.
280-
kCannotChange = BIT(18)
280+
kCancelTTreeChangeRequest = BIT(18)
281281
};
282282
enum ERelativeTo { kBeg = 0, kCur = 1, kEnd = 2 };
283283
enum { kStartBigFile = 2000000000 };

io/io/src/TFileMerger.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ Bool_t TFileMerger::PartialMerge(Int_t in_type)
978978
}
979979

980980
fOutputFile->SetBit(kMustCleanup);
981-
fOutputFile->SetBit(TFile::kCannotChange);
981+
fOutputFile->SetBit(TFile::kCancelTTreeChangeRequest);
982982

983983
TDirectory::TContext ctxt;
984984

@@ -1040,7 +1040,7 @@ Bool_t TFileMerger::PartialMerge(Int_t in_type)
10401040
Clear();
10411041
} else {
10421042
fOutputFile->ResetBit(kMustCleanup);
1043-
fOutputFile->ResetBit(TFile::kCannotChange);
1043+
fOutputFile->ResetBit(TFile::kCancelTTreeChangeRequest);
10441044
SafeDelete(fOutputFile);
10451045
}
10461046
return result;

tree/tree/src/TTree.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,7 @@ TFile* TTree::ChangeFile(TFile* file)
27442744
{
27452745
// Changing file clashes with the design of TMemFile and derivates, see #6523,
27462746
// as well as with TFileMerger operations, see #6640.
2747-
if ((dynamic_cast<TMemFile *>(file)) || file->TestBit(TFile::kCannotChange))
2747+
if ((dynamic_cast<TMemFile *>(file)) || file->TestBit(TFile::kCancelTTreeChangeRequest))
27482748
return file;
27492749
file->cd();
27502750
Write();

0 commit comments

Comments
 (0)