Skip to content

Commit f187266

Browse files
committed
Include standard includes where required
Includes like "strlcpy.h" and "snprintf.h" are provided via Rtypes.h, but really used only in part of the sources. Before removing them from Rtypes.h (in dev builds) provide them all in required places
1 parent ed69dfe commit f187266

File tree

208 files changed

+416
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+416
-163
lines changed

bindings/pyroot_legacy/src/Utility.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
#include "TMethodArg.h"
2929
#include "TError.h"
3030
#include "TInterpreter.h"
31+
#include "snprintf.h"
3132

3233
// Standard
33-
#include <stdlib.h>
34-
#include <stdio.h>
35-
#include <string.h>
34+
#include <cstdlib>
35+
#include <cstdio>
36+
#include <cstring>
3637
#include <algorithm>
3738
#include <list>
3839
#include <mutex>

core/base/inc/TString.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "ROOT/RStringView.hxx"
2929
#include "ROOT/TypeTraits.hxx"
30+
#include "snprintf.h"
3031

3132
#include <iosfwd>
3233
#include <cstdarg>

core/base/src/TColor.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "TError.h"
1919
#include "TMathBase.h"
2020
#include "TApplication.h"
21+
#include "snprintf.h"
2122
#include <algorithm>
2223
#include <cmath>
2324
#include <iostream>

core/base/src/TDatime.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ required, use TTimeStamp.
2626

2727
#include <ROOT/RConfig.hxx>
2828

29-
#include <time.h>
29+
#include <ctime>
3030

3131
#ifdef WIN32
3232
#include "Windows4Root.h"
@@ -35,6 +35,7 @@ required, use TTimeStamp.
3535

3636
#include "TBuffer.h"
3737
#include "Strlen.h"
38+
#include "snprintf.h"
3839
#include "TDatime.h"
3940
#include "TError.h"
4041
#include "Bytes.h"

core/base/src/TDirectory.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <cstdlib>
1212

1313
#include "Strlen.h"
14+
#include "strlcpy.h"
1415
#include "TDirectory.h"
1516
#include "TBuffer.h"
1617
#include "TClassTable.h"

core/base/src/TEnv.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ into the local file by default.
6767

6868
#include "RConfigure.h"
6969

70-
#include <string.h>
71-
#include <stdio.h>
72-
#include <stdlib.h>
73-
#include <ctype.h>
70+
#include <cstring>
71+
#include <cstdio>
72+
#include <cstdlib>
73+
#include <cctype>
7474

75+
#include "strlcpy.h"
7576
#include "TEnv.h"
7677
#include "TROOT.h"
7778
#include "TSystem.h"

core/base/src/TExec.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <iostream>
1313
#include "TROOT.h"
1414
#include "TExec.h"
15+
#include "snprintf.h"
1516

1617
ClassImp(TExec);
1718

core/base/src/TFolder.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ if this pointer is used frequently or inside loops.
8484

8585
#include <iostream>
8686
#include "Strlen.h"
87+
#include "strlcpy.h"
8788
#include "TFolder.h"
8889
#include "TBrowser.h"
8990
#include "TList.h"

core/base/src/TMacro.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ A macro can be written to a ROOT file via TObject::Write.
5151
#include "TObjString.h"
5252
#include "TROOT.h"
5353
#include "TSystem.h"
54+
#include "strlcpy.h"
5455
#include <iostream>
5556
#include <fstream>
5657
#include <sstream>

core/base/src/TObject.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class hierarchies (watch out for overlaps).
3636
#include <iostream>
3737

3838
#include "Varargs.h"
39+
#include "snprintf.h"
3940
#include "TObject.h"
4041
#include "TBuffer.h"
4142
#include "TClass.h"

0 commit comments

Comments
 (0)