Skip to content

Commit

Permalink
test-suite warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wsfulton committed Feb 21, 2016
1 parent 1e7c04c commit 1a26710
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Examples/test-suite/extend.i
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ struct Base {
virtual int method(int v) {
return v;
}
#if !defined(SWIG)
virtual ~Base() {}
#endif
};
struct Derived : Base {
double actualval;
Expand Down
1 change: 1 addition & 0 deletions Examples/test-suite/li_boost_shared_ptr.i
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ template <class T1, class T2> struct Base {
T2 baseVal2;
Base(T1 t1, T2 t2) : baseVal1(t1*2), baseVal2(t2*2) {}
virtual std::string getValue() const { return "Base<>"; };
virtual ~Base() {}
};
%}

Expand Down
2 changes: 2 additions & 0 deletions Examples/test-suite/li_boost_shared_ptr_template.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class Base {
public:
virtual T bar() {return 1;}
virtual ~Base() {}
};

template <class T>
Expand Down Expand Up @@ -79,6 +80,7 @@ template <class X, class T = int>
class BaseDefault {
public:
virtual T bar2() {return 3;}
virtual ~BaseDefault() {}
};

template <class X, class T = int>
Expand Down
1 change: 1 addition & 0 deletions Examples/test-suite/member_funcptr_galore.i
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public:
void move(double dx, double dy);
virtual double area(Shape &ref, int & (FunkSpace::Funktions::*d)(const int &, int)) { return 0.0; }
virtual double abc(Thing<short> ts, Thing< const Space::Shape * > tda[]) { return 0.0; }
virtual ~Shape() {}
};
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/test-suite/template_default_arg.i
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
X(const T& t = T()) {}
X(double a, const T& t = T(0)) {}
T meth(double a, const T& t = T(0)) { return t; }
const T& meth(const T& t = T(0)) { return t; }
const T& meth(const T& t = T(0)) { static T tt; tt = t; return tt; }
};

template <typename TT> class Y : private X<TT> {
Expand Down
5 changes: 4 additions & 1 deletion Examples/test-suite/template_typedef_inherit.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
typedef std::string String;

namespace Type {
template <class T> class TypedInterfaceObject {};
template <class T> class TypedInterfaceObject {
virtual ~TypedInterfaceObject() {}
};

template <class T> class TypedCollectionInterfaceObject : public TypedInterfaceObject<T> {
public:
Expand All @@ -27,6 +29,7 @@ namespace Type {

/** Method add() appends an element to the collection */
inline virtual void add(const T & elt) {}
virtual ~PersistentCollection() {}
};
}
%}
Expand Down
1 change: 1 addition & 0 deletions Examples/test-suite/using_protected.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ protected:
int x;
int blah(int xx) { return xx; }
virtual int vmethod(int xx) { return xx; }
virtual ~Foo() {}
};

class FooBar : public Foo {
Expand Down
1 change: 1 addition & 0 deletions Examples/test-suite/virtual_vs_nonvirtual_base.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SimpleNonVirtual
{
public:
int dummy() { return 0; }
virtual ~SimpleNonVirtual() {}
};

class SimpleReturnClass
Expand Down

0 comments on commit 1a26710

Please sign in to comment.