Clean up testcase source whitespace
This commit is contained in:
parent
860731e0ea
commit
9f87d81fae
1 changed files with 9 additions and 11 deletions
|
|
@ -18,32 +18,30 @@
|
|||
POINT,
|
||||
CIRCLE
|
||||
};
|
||||
|
||||
virtual ~Geometry() {}
|
||||
|
||||
virtual ~Geometry() {}
|
||||
virtual int draw() = 0;
|
||||
static Geometry *create(GeomType i);
|
||||
virtual Geometry *clone() = 0;
|
||||
virtual Geometry *clone() = 0;
|
||||
};
|
||||
|
||||
struct Point : Geometry {
|
||||
int draw() { return 1; }
|
||||
double width() { return 1.0; }
|
||||
Geometry *clone() { return new Point(); }
|
||||
double width() { return 1.0; }
|
||||
Geometry *clone() { return new Point(); }
|
||||
};
|
||||
|
||||
struct Circle : Geometry {
|
||||
int draw() { return 2; }
|
||||
double radius() { return 1.5; }
|
||||
Geometry *clone() { return new Circle(); }
|
||||
};
|
||||
double radius() { return 1.5; }
|
||||
Geometry *clone() { return new Circle(); }
|
||||
};
|
||||
|
||||
Geometry *Geometry::create(GeomType type) {
|
||||
switch (type) {
|
||||
case POINT: return new Point();
|
||||
case CIRCLE: return new Circle();
|
||||
case CIRCLE: return new Circle();
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue