Skip to content

Commit 55145f0

Browse files
vgvassilevhahnjo
authored andcommitted
Revert "[core] Materialize symbols for TError variables"
This reverts commit 329fb5a.
1 parent 566e73c commit 55145f0

3 files changed

Lines changed: 10 additions & 18 deletions

File tree

core/foundation/inc/TError.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@
3939

4040
class TVirtualMutex;
4141

42-
R__EXTERN const Int_t kUnset;
43-
R__EXTERN const Int_t kPrint;
44-
R__EXTERN const Int_t kInfo;
45-
R__EXTERN const Int_t kWarning;
46-
R__EXTERN const Int_t kError;
47-
R__EXTERN const Int_t kBreak;
48-
R__EXTERN const Int_t kSysError;
49-
R__EXTERN const Int_t kFatal;
42+
constexpr Int_t kUnset = -1;
43+
constexpr Int_t kPrint = 0;
44+
constexpr Int_t kInfo = 1000;
45+
constexpr Int_t kWarning = 2000;
46+
constexpr Int_t kError = 3000;
47+
constexpr Int_t kBreak = 4000;
48+
constexpr Int_t kSysError = 5000;
49+
constexpr Int_t kFatal = 6000;
50+
5051

5152
// TROOT sets the error ignore level handler, the system error message handler, and the error abort handler on
5253
// construction such that the "Root.ErrorIgnoreLevel" environment variable is used for the ignore level

core/foundation/src/RLogger.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ inline bool RLogHandlerDefault::Emit(const RLogEntry &entry)
5252
if (!entry.fLocation.fFuncName.empty())
5353
strm << " in " << entry.fLocation.fFuncName;
5454

55-
static const int errorLevelOld[] = {kFatal /*unset*/, kFatal, kError, kWarning, kInfo, kInfo /*debug*/};
55+
static constexpr const int errorLevelOld[] = {kFatal /*unset*/, kFatal, kError, kWarning, kInfo, kInfo /*debug*/};
5656
(*::GetErrorHandler())(errorLevelOld[cappedLevel], entry.fLevel == ELogLevel::kFatal, strm.str().c_str(),
5757
entry.fMessage.c_str());
5858
return true;

core/foundation/src/TError.cxx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ to be replaced by the proper DefaultErrorHandler()
2828
#include <cerrno>
2929
#include <string>
3030

31-
const Int_t kUnset = -1;
32-
const Int_t kPrint = 0;
33-
const Int_t kInfo = 1000;
34-
const Int_t kWarning = 2000;
35-
const Int_t kError = 3000;
36-
const Int_t kBreak = 4000;
37-
const Int_t kSysError = 5000;
38-
const Int_t kFatal = 6000;
39-
4031
Int_t gErrorIgnoreLevel = kUnset;
4132
Int_t gErrorAbortLevel = kSysError+1;
4233
Bool_t gPrintViaErrorHandler = kFALSE;

0 commit comments

Comments
 (0)