mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11: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;
|
||||
public:
|
||||
Square(double S) : SideLength(S) {}
|
||||
double computeArea() /* override */;
|
||||
double computeArea() override;
|
||||
};
|
||||
|
||||
class Circle : public Shape {
|
||||
double Radius;
|
||||
public:
|
||||
Circle(double R) : Radius(R) {}
|
||||
double computeArea() /* override */;
|
||||
double computeArea() override;
|
||||
};
|
||||
|
||||
The most basic working setup for LLVM-style RTTI requires the following
|
||||
@ -135,7 +135,7 @@ steps:
|
||||
public:
|
||||
- Square(double S) : SideLength(S) {}
|
||||
+ Square(double S) : Shape(SK_Square), SideLength(S) {}
|
||||
double computeArea() /* override */;
|
||||
double computeArea() override;
|
||||
};
|
||||
|
||||
class Circle : public Shape {
|
||||
@ -143,7 +143,7 @@ steps:
|
||||
public:
|
||||
- Circle(double R) : 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
|
||||
@ -175,7 +175,7 @@ steps:
|
||||
double SideLength;
|
||||
public:
|
||||
Square(double S) : Shape(SK_Square), SideLength(S) {}
|
||||
double computeArea() /* override */;
|
||||
double computeArea() override;
|
||||
+
|
||||
+ static bool classof(const Shape *S) {
|
||||
+ return S->getKind() == SK_Square;
|
||||
@ -186,7 +186,7 @@ steps:
|
||||
double Radius;
|
||||
public:
|
||||
Circle(double R) : Shape(SK_Circle), Radius(R) {}
|
||||
double computeArea() /* override */;
|
||||
double computeArea() override;
|
||||
+
|
||||
+ static bool classof(const Shape *S) {
|
||||
+ return S->getKind() == SK_Circle;
|
||||
|
Loading…
Reference in New Issue
Block a user