File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
roottest/root/tree/branches Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- class ABC {
1+ class BaseABC {
22public:
3- ABC (int i = -1 ): abc(i) {}
4- virtual ~ABC () {}
3+ BaseABC (int i = -1 ): abc(i) {}
4+ virtual ~BaseABC () {}
55 virtual int pv () = 0;
66 int abc;
77};
88
9- class Derived : public ABC {
9+ class Derived : public BaseABC {
1010public:
1111 ~Derived () override {}
12- Derived (int i = -2 ): ABC (i+1 ), derived(i) {}
12+ Derived (int i = -2 ): BaseABC (i+1 ), derived(i) {}
1313
1414 int pv () override { return abc + derived; }
1515 int derived;
1616};
1717
1818class Holder {
1919public:
20- Holder (): fABC (0 ) {}
20+ Holder (): fABC (nullptr ) {}
2121 ~Holder () { delete fABC ; }
2222
2323 void Set (int i) { delete fABC ; fABC = new Derived (i); }
2424
25- ABC * fABC ;
25+ BaseABC * fABC ;
2626};
2727
Original file line number Diff line number Diff line change 11<rootdict >
2- <class name =" ABC " />
2+ <class name =" BaseABC " />
33 <class name =" Derived" />
44 <class name =" Holder" />
55</rootdict >
You can’t perform that action at this time.
0 commit comments