Fix static build using extended RTTI

Fix declaration of 'o' hides previous local declaration warnings.

Change two wxCONSTRUCTOR_5 definitions using wxBitmapBundle instead of
wxBitmap (this does not give build errors).

wxGenericCalendarCtrl is missing all XTI implementations, so just use
RTTI. And fix building the xti sample.

Note the shared build still fails due to WXDLLIMPEXP related issues.

Closes #22300.

Closes #22301.
This commit is contained in:
Maarten Bent
2022-04-14 19:46:03 +02:00
committed by Vadim Zeitlin
parent 0ba4cf8ac9
commit 5bea1dc18a
8 changed files with 44 additions and 34 deletions

View File

@@ -372,6 +372,10 @@ private:
class WXDLLIMPEXP_BASE wxObject
{
#if wxUSE_EXTENDED_RTTI
wxDECLARE_DYNAMIC_CLASS(wxObject);
#endif
public:
wxObject() { m_refData = NULL; }
virtual ~wxObject() { UnRef(); }
@@ -394,8 +398,6 @@ public:
bool IsKindOf(const wxClassInfo *info) const;
virtual wxClassInfo *GetClassInfo() const;
// Turn on the correct set of new and delete operators
#ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT
@@ -440,10 +442,14 @@ public:
// check if this object references the same data as the other one
bool IsSameAs(const wxObject& o) const { return m_refData == o.m_refData; }
#if !wxUSE_EXTENDED_RTTI
virtual wxClassInfo* GetClassInfo() const;
// RTTI information, usually declared by wxDECLARE_DYNAMIC_CLASS() or
// similar, but done manually for the hierarchy root. Note that it's public
// for compatibility reasons, but shouldn't be accessed directly.
static wxClassInfo ms_classInfo;
#endif
protected:
// ensure that our data is not shared with anybody else: if we have no