add missing virtual destructors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f3a2a4f0ee
commit
3a27443cd8
3 changed files with 6 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ struct Foo5 : Foo4 {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Foo6 : Foo4 {
|
struct Foo6 : Foo4 {
|
||||||
Foo6(const Foo6& ) { }
|
Foo6(const Foo6& f) : Foo4(f) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Foo7 : Foo5 {
|
struct Foo7 : Foo5 {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
%inline %{
|
%inline %{
|
||||||
struct Base {
|
struct Base {
|
||||||
Base() : MethodOrVariable(0) {}
|
Base() : MethodOrVariable(0) {}
|
||||||
|
virtual ~Base() {}
|
||||||
protected:
|
protected:
|
||||||
int MethodOrVariable;
|
int MethodOrVariable;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@ namespace simuPOP
|
||||||
{
|
{
|
||||||
Pop m_pop;
|
Pop m_pop;
|
||||||
Operator(int a):m_pop(a){}
|
Operator(int a):m_pop(a){}
|
||||||
|
virtual ~Operator()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual int func() const
|
virtual int func() const
|
||||||
{ return m_pop.m_a; }
|
{ return m_pop.m_a; }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue