Skip to content

Commit 1cbc0d7

Browse files
Remove unnecessary and bougus include.(ROOT-5123).
1 parent 6568acf commit 1cbc0d7

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

core/base/src/TROOT.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@
113113
#include "TListOfFunctions.h"
114114
#include "TListOfFunctionTemplates.h"
115115
#include "TFunctionTemplate.h"
116-
#include "TGClient.h"
117-
#include "X3DBuffer.h"
118-
#include "TFile.h"
119-
#include "TVirtualGL.h"
120116

121117
#include <string>
122118
namespace std {} using namespace std;

core/base/src/TVirtualGL.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@
1818

1919
#include "TVirtualGL.h"
2020
#include "TROOT.h"
21+
#include "TGlobal.h"
2122

2223

2324
ClassImp(TGLManager)
2425

2526
TGLManager * (*gPtr2GLManager)() = 0;
2627

28+
namespace {
29+
static struct AddPseudoGlobals {
30+
AddPseudoGlobals() {
31+
// User "gCling" as synonym for "libCore static initialization has happened".
32+
// This code here must not trigger it.
33+
TGlobalMappedFunction::Add(new TGlobalMappedFunction("gGLManager", "TVirtualGL*",
34+
(TGlobalMappedFunction::GlobalFunc_t)&gGLManager));
35+
}
36+
} gAddPseudoGlobals;
37+
}
38+
2739
//____________________________________________________________________________
2840
TGLManager::TGLManager() : TNamed("gGLManager", "")
2941
{

gui/gui/src/TGClient.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ static TGClient *gClientGlobal = 0;
5555
namespace {
5656
static struct AddPseudoGlobals {
5757
AddPseudoGlobals() {
58-
gROOT->GetListOfGlobals()->Add(new TGlobalMappedFunction("gClient", "TGClient*",
58+
// User "gCling" as synonym for "libCore static initialization has happened".
59+
// This code here must not trigger it.
60+
TGlobalMappedFunction::Add(new TGlobalMappedFunction("gClient", "TGClient*",
5961
(TGlobalMappedFunction::GlobalFunc_t)&TGClient::Instance));
6062
}
6163
} gAddPseudoGlobals;

0 commit comments

Comments
 (0)