Skip to content

Commit a2f31ba

Browse files
ferdymercurypcanal
andauthored
[test] fix some override and deprecation warnings
* [test] fix some override and deprecation warnings See https://github.com/root-project/root/pull/20501/files * Apply suggestions from code review Co-authored-by: Philippe Canal <[email protected]> --------- Co-authored-by: Philippe Canal <[email protected]>
1 parent 6d3e9ed commit a2f31ba

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

roottest/root/io/newstl/TestHelpers.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class HelperDerived : public HelperClassDef {
7272
HelperDerived() : f(-1) {};
7373
explicit HelperDerived(int v,double d, float finput) : HelperClassDef(v,d),f(finput) {};
7474

75-
virtual bool IsEquiv(const Helper &rhs) const {
75+
bool IsEquiv(const Helper &rhs) const override {
7676
bool result = Helper::IsEquiv(rhs);
7777
if (result) {
7878
const HelperDerived *drhs = dynamic_cast<const HelperDerived*>(&rhs);
@@ -82,7 +82,7 @@ class HelperDerived : public HelperClassDef {
8282
return result;
8383
}
8484

85-
virtual const char* CompMsg(const Helper& copy) const {
85+
const char* CompMsg(const Helper& copy) const override {
8686
const HelperDerived *drhs = dynamic_cast<const HelperDerived*>(&copy);
8787
if (drhs==0) {
8888
TString msg = Helper::CompMsg(copy);
@@ -113,7 +113,7 @@ class THelperDerived : public THelper {
113113
THelperDerived() : f(-1) {};
114114
explicit THelperDerived(int v,double d, float finput) : THelper(v,d),f(finput) {};
115115

116-
virtual bool IsEquiv(const Helper &rhs) const {
116+
bool IsEquiv(const Helper &rhs) const override {
117117
bool result = Helper::IsEquiv(rhs);
118118
if (result) {
119119
const THelperDerived *drhs = dynamic_cast<const THelperDerived*>(&rhs);
@@ -123,7 +123,7 @@ class THelperDerived : public THelper {
123123
return true;
124124
}
125125

126-
virtual const char* CompMsg(const Helper& copy) const {
126+
const char* CompMsg(const Helper& copy) const override {
127127
const THelperDerived *drhs = dynamic_cast<const THelperDerived*>(&copy);
128128
if (drhs==0) {
129129
TString msg = THelper::CompMsg(copy);

roottest/root/treeformula/parse/ClassDefinitions.C

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class QRawPulseR : public TObject
1010
QRawPulseR();
1111
~QRawPulseR() override;
1212
const QRawPulseR& operator=(const QRawPulseR& P);
13+
QRawPulseR(const QRawPulseR& P) = default;
1314
void SetDataHist(const int, double*);
1415
void SetChannel(const Int_t chan) {fChannel = chan;}
1516

@@ -59,6 +60,7 @@ class QRawTriggerPulseR : public QRawPulseR
5960
QRawTriggerPulseR();
6061
~QRawTriggerPulseR() override;
6162
const QRawTriggerPulseR& operator=(const QRawTriggerPulseR& P);
63+
QRawTriggerPulseR(const QRawTriggerPulseR& P) = default;
6264
Int_t GetTriggerPosition() const { return ftrigger_position; }
6365

6466
private:
@@ -101,7 +103,7 @@ class QRawEventR : public TObject
101103
QRawPulseR fraw_pulse;
102104
QRawTriggerPulseR fraw_trigger_pulse;
103105

104-
ClassDef (QRawEventR, 1)
106+
ClassDefOverride (QRawEventR, 1)
105107
};
106108

107109

0 commit comments

Comments
 (0)