mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
[docs] [cleanup] No need for a comment around C++11 override
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9d3801cd2
commit
a5f199122a
@ -40,14 +40,14 @@ RTTI for this class hierarchy:
|
|||||||
double SideLength;
|
double SideLength;
|
||||||
public:
|
public:
|
||||||
Square(double S) : SideLength(S) {}
|
Square(double S) : SideLength(S) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Circle : public Shape {
|
class Circle : public Shape {
|
||||||
double Radius;
|
double Radius;
|
||||||
public:
|
public:
|
||||||
Circle(double R) : Radius(R) {}
|
Circle(double R) : Radius(R) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
The most basic working setup for LLVM-style RTTI requires the following
|
The most basic working setup for LLVM-style RTTI requires the following
|
||||||
@ -135,7 +135,7 @@ steps:
|
|||||||
public:
|
public:
|
||||||
- Square(double S) : SideLength(S) {}
|
- Square(double S) : SideLength(S) {}
|
||||||
+ Square(double S) : Shape(SK_Square), SideLength(S) {}
|
+ Square(double S) : Shape(SK_Square), SideLength(S) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Circle : public Shape {
|
class Circle : public Shape {
|
||||||
@ -143,7 +143,7 @@ steps:
|
|||||||
public:
|
public:
|
||||||
- Circle(double R) : Radius(R) {}
|
- Circle(double R) : Radius(R) {}
|
||||||
+ Circle(double R) : Shape(SK_Circle), Radius(R) {}
|
+ Circle(double R) : Shape(SK_Circle), Radius(R) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#. Finally, you need to inform LLVM's RTTI templates how to dynamically
|
#. Finally, you need to inform LLVM's RTTI templates how to dynamically
|
||||||
@ -175,7 +175,7 @@ steps:
|
|||||||
double SideLength;
|
double SideLength;
|
||||||
public:
|
public:
|
||||||
Square(double S) : Shape(SK_Square), SideLength(S) {}
|
Square(double S) : Shape(SK_Square), SideLength(S) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
+
|
+
|
||||||
+ static bool classof(const Shape *S) {
|
+ static bool classof(const Shape *S) {
|
||||||
+ return S->getKind() == SK_Square;
|
+ return S->getKind() == SK_Square;
|
||||||
@ -186,7 +186,7 @@ steps:
|
|||||||
double Radius;
|
double Radius;
|
||||||
public:
|
public:
|
||||||
Circle(double R) : Shape(SK_Circle), Radius(R) {}
|
Circle(double R) : Shape(SK_Circle), Radius(R) {}
|
||||||
double computeArea() /* override */;
|
double computeArea() override;
|
||||||
+
|
+
|
||||||
+ static bool classof(const Shape *S) {
|
+ static bool classof(const Shape *S) {
|
||||||
+ return S->getKind() == SK_Circle;
|
+ return S->getKind() == SK_Circle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user