mirror of https://github.com/swig/swig
Testcase correction for using declaration and members
The compiler calls setWindowGrab(bool) instead of setWindowsGrab(NativeWindowType*) and gives a warning with Visual C++ when calling setWindowGrab(true) with a pointer to ApplicationContextSDL. Looks like function function hiding of the non-virtual method. I can't see this changing testing of the original bug.
This commit is contained in:
parent
1da824ceff
commit
7f97278739
|
@ -26,7 +26,7 @@ namespace OgreBites
|
|||
class ApplicationContextSDL : public ApplicationContextBase {
|
||||
public:
|
||||
using ApplicationContextBase::setWindowGrab;
|
||||
int setWindowGrab(NativeWindowType* win, bool grab) { return 10; } // This should not be added again as it exists in base class
|
||||
int setWindowGrab(NativeWindowType* win, bool grab = true) { return 10; } // This should not be added again as it exists in base class
|
||||
|
||||
static int call_setWindowGrab(ApplicationContextSDL* ptr, NativeWindowType* win, bool grab) { return ptr->setWindowGrab(win, grab); }
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ namespace OgreBites
|
|||
class ACSDL : public ACB {
|
||||
public:
|
||||
using ACB::setWindowGrab; // This introduces two methods, not one method like ApplicationContextSDL
|
||||
int setWindowGrab(NativeWindowType* win, bool grab) { return 10; } // This should not be added again as it exists in base class
|
||||
int setWindowGrab(NativeWindowType* win, bool grab = true) { return 10; } // This should not be added again as it exists in base class
|
||||
|
||||
static int call_setWindowGrab(ACSDL* ptr, NativeWindowType* win, bool grab) { return ptr->setWindowGrab(win, grab); }
|
||||
static int call_setWindowGrab(ACSDL* ptr, const char *s, int val) { return ptr->setWindowGrab(s, val); }
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace OgreBites
|
|||
class ApplicationContextSDL : public ApplicationContextBase {
|
||||
public:
|
||||
using ApplicationContextBase::setWindowGrab;
|
||||
void setWindowGrab(NativeWindowType* win, bool grab) {} // This should not be added again as it exists in base class
|
||||
void setWindowGrab(NativeWindowType* win, bool grab = true) {} // This should not be added again as it exists in base class
|
||||
};
|
||||
/*
|
||||
typedef not working yet
|
||||
|
|
Loading…
Reference in New Issue