Skip to content

Commit 6d43286

Browse files
committed
[RF] Add missing override keywords in test
This commit contains automatic changes done by `clang-tidy`.
1 parent 82fd094 commit 6d43286

Some content is hidden

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

78 files changed

+338
-338
lines changed

test/Aclock.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class TPolygon : public TPolyLine {
3030

3131
public:
3232
TPolygon(Int_t n, Float_t *x, Float_t *y);
33-
virtual ~TPolygon() { fPad->GetListOfPrimitives()->Remove(this); }
33+
~TPolygon() override { fPad->GetListOfPrimitives()->Remove(this); }
3434

35-
virtual void Paint(Option_t *option="");
35+
void Paint(Option_t *option="") override;
3636

3737
TPad *GetPad() { return fPad; }
3838
};
@@ -43,7 +43,7 @@ class ClockPoints : public TPoints {
4343

4444
public:
4545
ClockPoints(Coord_t x=0, Coord_t y=0) : TPoints(x,y) { }
46-
~ClockPoints() { }
46+
~ClockPoints() override { }
4747

4848
void SetXY(Coord_t x, Coord_t y) { SetX(x); SetY(y); }
4949

@@ -80,7 +80,7 @@ class ClockHand : public TPolygon {
8080

8181
public:
8282
ClockHand(Int_t n, Float_t *x, Float_t *y);
83-
virtual ~ClockHand() { }
83+
~ClockHand() override { }
8484

8585
UInt_t GetTime() { fgTime->Set(); return fgTime->GetTime(); }
8686
UInt_t GetHour() { return GetTime()/10000; }
@@ -103,9 +103,9 @@ class MinuteHand : public ClockHand {
103103
public:
104104
MinuteHand(Int_t n=3, Float_t *x=fgMinuteHandX, Float_t *y=fgMinuteHandY)
105105
: ClockHand(n,x,y) { }
106-
~MinuteHand() { }
106+
~MinuteHand() override { }
107107

108-
Float_t GetHandAngle() { return 6.*(GetMinute()+ GetSecond()/60.); }
108+
Float_t GetHandAngle() override { return 6.*(GetMinute()+ GetSecond()/60.); }
109109
};
110110

111111

@@ -119,9 +119,9 @@ class HourHand : public ClockHand {
119119
public:
120120
HourHand(Int_t n=3, Float_t *x=fgHourHandX, Float_t *y=fgHourHandY)
121121
: ClockHand(n,x,y) { }
122-
~HourHand() { }
122+
~HourHand() override { }
123123

124-
Float_t GetHandAngle() { return 30.*(GetHour()%12 + GetMinute()/60.); }
124+
Float_t GetHandAngle() override { return 30.*(GetHour()%12 + GetMinute()/60.); }
125125
};
126126

127127

@@ -133,14 +133,14 @@ class SecondHand : public ClockHand {
133133
static Float_t fgSecondHandY[];
134134

135135
protected:
136-
UInt_t GetTimeValue() { return GetSecond(); } // used to update every second
136+
UInt_t GetTimeValue() override { return GetSecond(); } // used to update every second
137137

138138
public:
139139
SecondHand(Int_t n=4, Float_t *x=fgSecondHandX, Float_t *y=fgSecondHandY)
140140
: ClockHand(n,x,y) { }
141-
~SecondHand() { }
141+
~SecondHand() override { }
142142

143-
Float_t GetHandAngle() { return 6.*GetSecond(); }
143+
Float_t GetHandAngle() override { return 6.*GetSecond(); }
144144
};
145145

146146

@@ -155,13 +155,13 @@ class Aclock : public TTimer {
155155

156156
public:
157157
Aclock(Int_t csize=100);
158-
virtual ~Aclock();
158+
~Aclock() override;
159159

160-
virtual Bool_t Notify();
161-
void Paint(Option_t *option);
160+
Bool_t Notify() override;
161+
void Paint(Option_t *option) override;
162162
void Animate();
163163

164-
ClassDef(Aclock,0) // analog clock = xclock
164+
ClassDefOverride(Aclock,0) // analog clock = xclock
165165
};
166166

167167
#endif // ACLOCK

test/Event.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class Track : public TObject {
4949
Track() : fTriggerBits(64) { fNsp = 0; fPointValue = 0; }
5050
Track(const Track& orig);
5151
Track(Float_t random);
52-
virtual ~Track() {Clear(); delete [] fPointValue; fPointValue = nullptr; }
52+
~Track() override {Clear(); delete [] fPointValue; fPointValue = nullptr; }
5353
Track &operator=(const Track &orig);
5454

5555
void Set(Float_t random);
56-
void Clear(Option_t *option="");
56+
void Clear(Option_t *option="") override;
5757
Float_t GetPx() const { return fPx; }
5858
Float_t GetPy() const { return fPy; }
5959
Float_t GetPz() const { return fPz; }
@@ -78,7 +78,7 @@ class Track : public TObject {
7878
Int_t GetN() const { return fNsp; }
7979
Double32_t GetPointValue(Int_t i=0) const { return (i<fNsp)?fPointValue[i]:0; }
8080

81-
ClassDef(Track,2) //A track segment
81+
ClassDefOverride(Track,2) //A track segment
8282
};
8383

8484
class EventHeader {
@@ -131,9 +131,9 @@ class Event : public TObject {
131131

132132
public:
133133
Event();
134-
virtual ~Event();
134+
~Event() override;
135135
void Build(Int_t ev, Int_t arg5=600, Float_t ptmin=1);
136-
void Clear(Option_t *option ="");
136+
void Clear(Option_t *option ="") override;
137137
Bool_t IsValid() const { return fIsValid; }
138138
static void Reset(Option_t *option ="");
139139
void ResetHistogramPointer() {fH=0;}
@@ -167,7 +167,7 @@ class Event : public TObject {
167167
Double32_t GetMatrix(UChar_t x, UChar_t y) { return (x<4&&y<4)?fMatrix[x][y]:0; }
168168
TBits& GetTriggerBits() { return fTriggerBits; }
169169

170-
ClassDef(Event,1) //Event structure
170+
ClassDefOverride(Event,1) //Event structure
171171
};
172172

173173

test/EventMT.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ class Track : public TObject {
5252
Track() { fPointValue = 0; }
5353
Track(const Track& orig);
5454
Track(Float_t random);
55-
virtual ~Track() {Clear();}
55+
~Track() override {Clear();}
5656
Track &operator=(const Track &orig);
5757

58-
void Clear(Option_t *option="");
58+
void Clear(Option_t *option="") override;
5959
Float_t GetPx() const { return fPx; }
6060
Float_t GetPy() const { return fPy; }
6161
Float_t GetPz() const { return fPz; }
@@ -80,7 +80,7 @@ class Track : public TObject {
8080
Int_t GetN() const { return fNsp; }
8181
Double32_t GetPointValue(Int_t i=0) const { return (i<fNsp)?fPointValue[i]:0; }
8282

83-
ClassDef(Track,2) //A track segment
83+
ClassDefOverride(Track,2) //A track segment
8484
};
8585

8686
class EventHeader {
@@ -98,7 +98,7 @@ class EventHeader {
9898
Int_t GetRun() const { return fRun; }
9999
Int_t GetDate() const { return fDate; }
100100

101-
ClassDef(EventHeader,1) //Event Header
101+
ClassDefOverride(EventHeader,1) //Event Header
102102
};
103103

104104

@@ -127,9 +127,9 @@ class Event : public TObject {
127127

128128
public:
129129
Event();
130-
virtual ~Event();
130+
~Event() override;
131131
void Build(Int_t ev, Int_t arg5=600, Float_t ptmin=1);
132-
void Clear(Option_t *option ="");
132+
void Clear(Option_t *option ="") override;
133133
Bool_t IsValid() const { return fIsValid; }
134134
void ResetHistogramPointer() {fH=0;}
135135
void SetNseg(Int_t n) { fNseg = n; }
@@ -162,7 +162,7 @@ class Event : public TObject {
162162
Double32_t GetMatrix(UChar_t x, UChar_t y) { return (x<4&&y<4)?fMatrix[x][y]:0; }
163163
TBits& GetTriggerBits() { return fTriggerBits; }
164164

165-
ClassDef(Event,1) //Event structure
165+
ClassDefOverride(Event,1) //Event structure
166166
};
167167

168168

@@ -196,7 +196,7 @@ class HistogramManager {
196196

197197
void Hfill(Event *event);
198198

199-
ClassDef(HistogramManager,1) //Manages all histograms
199+
ClassDefOverride(HistogramManager,1) //Manages all histograms
200200
};
201201

202202
#endif

test/Hello.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TChar : public TText {
2828

2929
public:
3030
TChar(char ch='\0',Coord_t x=0, Coord_t y=0);
31-
virtual ~TChar() { }
31+
~TChar() override { }
3232

3333
char GetChar() {
3434
return GetTitle()[0];
@@ -47,19 +47,19 @@ class Hello : public TTimer {
4747

4848
public:
4949
Hello(const char *text = "Hello, World!");
50-
virtual ~Hello();
50+
~Hello() override;
5151

52-
Bool_t Notify();
53-
void ExecuteEvent(Int_t event, Int_t px, Int_t py);
54-
Int_t DistancetoPrimitive(Int_t, Int_t) { return 0; }
52+
Bool_t Notify() override;
53+
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
54+
Int_t DistancetoPrimitive(Int_t, Int_t) override { return 0; }
5555

5656
Float_t GetWidth();
57-
void Paint(Option_t* option="");
58-
void Print(Option_t * = "") const;
59-
void ls(Option_t * = "") const;
57+
void Paint(Option_t* option="") override;
58+
void Print(Option_t * = "") const override;
59+
void ls(Option_t * = "") const override;
6060
TList *GetList() { return fList; }
6161

62-
ClassDef(Hello,0) // animated text with cool wave effect
62+
ClassDefOverride(Hello,0) // animated text with cool wave effect
6363
};
6464

6565
#endif

test/ProofBench/EventTree_NoProc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public :
8282
virtual void SlaveTerminate();
8383
virtual void Terminate();
8484

85-
ClassDef(EventTree_NoProc,0);
85+
ClassDefOverride(EventTree_NoProc,0);
8686
};
8787

8888
#endif

test/ProofBench/EventTree_Proc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public :
8282
virtual void SlaveTerminate();
8383
virtual void Terminate();
8484

85-
ClassDef(EventTree_Proc,0);
85+
ClassDefOverride(EventTree_Proc,0);
8686
};
8787

8888
#endif

test/ProofBench/EventTree_ProcOpt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public :
8282
virtual void SlaveTerminate();
8383
virtual void Terminate();
8484

85-
ClassDef(EventTree_ProcOpt,0);
85+
ClassDefOverride(EventTree_ProcOpt,0);
8686
};
8787

8888
#endif

test/RootIDE/TGRootIDE.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TGDocument : public TNamed {
6161
TGDocument(const char *fname = "", const char *title = "", Int_t tabid = 0,
6262
TGTab *tab = 0, TGTabElement *tabel = 0, TGTextEdit *edit = 0,
6363
TObjArray *doclist = 0);
64-
virtual ~TGDocument() { }
64+
~TGDocument() override { }
6565

6666
Bool_t Open(const char *filename);
6767
Bool_t Close();
@@ -76,7 +76,7 @@ class TGDocument : public TNamed {
7676
void DataChanged();
7777
void DataDropped(char *fname);
7878

79-
ClassDef(TGDocument,0) // Simple class describing document used in TGRootIDE
79+
ClassDefOverride(TGDocument,0) // Simple class describing document used in TGRootIDE
8080
};
8181

8282
class TGRootIDE : public TGMainFrame {
@@ -136,12 +136,12 @@ class TGRootIDE : public TGMainFrame {
136136
UInt_t w = 900, UInt_t h = 600);
137137
TGRootIDE(TMacro *macro, const TGWindow *p = 0, UInt_t w = 0,
138138
UInt_t h = 0);
139-
virtual ~TGRootIDE();
139+
~TGRootIDE() override;
140140

141-
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
142-
virtual Bool_t HandleKey(Event_t *event);
143-
virtual Bool_t HandleTimer(TTimer *t);
144-
virtual void CloseWindow();
141+
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
142+
Bool_t HandleKey(Event_t *event) override;
143+
Bool_t HandleTimer(TTimer *t) override;
144+
void CloseWindow() override;
145145

146146
void ClearText();
147147
Bool_t LoadBuffer(const char *buf) { return fTextEdit->LoadBuffer(buf); }
@@ -182,7 +182,7 @@ class TGRootIDE : public TGMainFrame {
182182
void MouseOver(char *);
183183
void MouseDown(char *);
184184

185-
ClassDef(TGRootIDE,0) // Simple IDE using TGTextEdit and TGHtml widgets
185+
ClassDefOverride(TGRootIDE,0) // Simple IDE using TGTextEdit and TGHtml widgets
186186
};
187187

188188
#endif

test/RootShower/GButtonFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class GButtonFrame: public TGCompositeFrame {
4242
// Constructor & destructor
4343
GButtonFrame(const TGWindow* p, TGWindow* buttonHandler, Int_t nextEventId,
4444
Int_t showTrackId, Int_t interruptSimId);
45-
virtual ~GButtonFrame();
45+
~GButtonFrame() override;
4646

4747
void SetState(EState state);
4848
};

test/RootShower/GTitleFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class GTitleFrame: public TGCompositeFrame {
4848
GTitleFrame(const TGWindow *p, const char *mainText, const char *subText,
4949
UInt_t w, UInt_t h, UInt_t options = kHorizontalFrame | kRaisedFrame);
5050
void ChangeRightLogo(Int_t frame);
51-
virtual ~GTitleFrame();
51+
~GTitleFrame() override;
5252
};
5353

5454
#endif // GTITLEFRAME_H

0 commit comments

Comments
 (0)