Skip to content

Commit ab3500f

Browse files
authored
Remove constructor bodies in ibor and overnight indexes
This looks like a confusion with %extend syntax for constructors[1]. These are regular constructors, so the syntax is wrong, but the bodies are ignored by SWIG anyway. [1] https://www.swig.org/Doc4.1/Python.html#Python_nn43
1 parent 9b879b2 commit ab3500f

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

QuantExt-SWIG/SWIG/qle_indexes.i

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,7 @@ class Name : public IborIndex {
268268
public:
269269
Name(const Period& tenor,
270270
const Handle<YieldTermStructure>& h =
271-
Handle<YieldTermStructure>()) {
272-
return new Name(new Name(tenor,h));
273-
}
271+
Handle<YieldTermStructure>());
274272
};
275273
%enddef
276274

@@ -282,9 +280,7 @@ using QuantExt::Name;
282280
class Name : public OvernightIndex {
283281
public:
284282
Name(const Handle<YieldTermStructure>& h =
285-
Handle<YieldTermStructure>()) {
286-
return new Name(new Name(h));
287-
}
283+
Handle<YieldTermStructure>());
288284
};
289285
%enddef
290286

0 commit comments

Comments
 (0)