diff options
author | Olly Betts <olly@survex.com> | 2014-02-24 10:10:24 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2014-02-24 10:10:24 +1300 |
commit | 0de4cf13a8aa4612ddead85b2680694fa1bf585e (patch) | |
tree | 8b624a485e0c3676fd846023150fffb03b1f70a7 /Examples/go | |
parent | 7f40ae357016709f499ffcc0f55ff87627f56d5d (diff) | |
download | swig-0de4cf13a8aa4612ddead85b2680694fa1bf585e.tar.gz |
Further cleaning up of class examples
Diffstat (limited to 'Examples/go')
-rw-r--r-- | Examples/go/class/example.h | 25 | ||||
-rw-r--r-- | Examples/go/class/example.i | 1 |
2 files changed, 10 insertions, 16 deletions
diff --git a/Examples/go/class/example.h b/Examples/go/class/example.h index 46d901361..0dff185b2 100644 --- a/Examples/go/class/example.h +++ b/Examples/go/class/example.h @@ -7,11 +7,11 @@ public: } virtual ~Shape() { nshapes--; - }; - double x, y; + } + double x, y; void move(double dx, double dy); - virtual double area(void) = 0; - virtual double perimeter(void) = 0; + virtual double area() = 0; + virtual double perimeter() = 0; static int nshapes; }; @@ -19,21 +19,16 @@ class Circle : public Shape { private: double radius; public: - Circle(double r) : radius(r) { }; - virtual double area(void); - virtual double perimeter(void); + Circle(double r) : radius(r) { } + virtual double area(); + virtual double perimeter(); }; class Square : public Shape { private: double width; public: - Square(double w) : width(w) { }; - virtual double area(void); - virtual double perimeter(void); + Square(double w) : width(w) { } + virtual double area(); + virtual double perimeter(); }; - - - - - diff --git a/Examples/go/class/example.i b/Examples/go/class/example.i index 75700b305..fbdf7249f 100644 --- a/Examples/go/class/example.i +++ b/Examples/go/class/example.i @@ -7,4 +7,3 @@ /* Let's just grab the original header file here */ %include "example.h" - |