Fix Java %interface family of macros
when returning by const pointer reference Closes #1987
This commit is contained in:
parent
499eb5806f
commit
429288fa1c
11 changed files with 154 additions and 3 deletions
|
|
@ -424,6 +424,36 @@ namespace Space {
|
|||
return d;
|
||||
}
|
||||
|
||||
// Return const pointer references
|
||||
CBase1 *const&MakeConstPtrRefDerived1_CBase1() {
|
||||
static CBase1 *d = new Derived1();
|
||||
return d;
|
||||
}
|
||||
CBase2 *const&MakeConstPtrRefDerived1_CBase2() {
|
||||
static CBase2 *const& d = new Derived1();
|
||||
return d;
|
||||
}
|
||||
CBase1 *const&MakeConstPtrRefDerived2_CBase1() {
|
||||
static CBase1 *const& d = new Derived2();
|
||||
return d;
|
||||
}
|
||||
ABase1 *const&MakeConstPtrRefDerived2_ABase1() {
|
||||
static ABase1 *const& d = new Derived2();
|
||||
return d;
|
||||
}
|
||||
ABase1 *const&MakeConstPtrRefDerived3_ABase1() {
|
||||
static ABase1 *const& d = new Derived3();
|
||||
return d;
|
||||
}
|
||||
CBase1 *const&MakeConstPtrRefDerived3_CBase1() {
|
||||
static CBase1 *const& d = new Derived3();
|
||||
return d;
|
||||
}
|
||||
CBase2 *const&MakeConstPtrRefDerived3_CBase2() {
|
||||
static CBase2 *const& d = new Derived3();
|
||||
return d;
|
||||
}
|
||||
|
||||
// Return by value (sliced objects)
|
||||
CBase1 MakeValDerived1_CBase1() {
|
||||
return Derived1();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue