Disable wxDeprecatedGUIConstants comparisons without 3.2 compat

Start preparing for removing these deprecated comparison operators.
This commit is contained in:
Vadim Zeitlin 2024-01-06 01:46:04 +01:00
parent 020f22de15
commit bddd46d343
3 changed files with 12 additions and 0 deletions

View file

@ -102,6 +102,8 @@ extern WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
// to compile without warnings which it would otherwise provoke from some
// compilers as it compares elements of different enums
#if WXWIN_COMPATIBILITY_3_2
wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants only")
inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t)
{
@ -114,4 +116,6 @@ inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t)
return static_cast<int>(s) != static_cast<int>(t);
}
#endif // WXWIN_COMPATIBILITY_3_2
#endif // _WX_BRUSH_H_BASE_

View file

@ -671,6 +671,8 @@ extern WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
// to compile without warnings which it would otherwise provoke from some
// compilers as it compares elements of different enums
#if WXWIN_COMPATIBILITY_3_2
wxDEPRECATED_MSG("use wxFONTFAMILY_XXX constants") \
inline bool operator==(wxFontFamily s, wxDeprecatedGUIConstants t)
{ return static_cast<int>(s) == static_cast<int>(t); }
@ -690,4 +692,6 @@ wxDEPRECATED_MSG("use wxFONTWEIGHT_XXX constants") \
inline bool operator!=(wxFontWeight s, wxDeprecatedGUIConstants t)
{ return static_cast<int>(s) != static_cast<int>(t); }
#endif // WXWIN_COMPATIBILITY_3_2
#endif // _WX_FONT_H_BASE_

View file

@ -133,6 +133,8 @@ extern WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList;
// to compile without warnings which it would otherwise provoke from some
// compilers as it compares elements of different enums
#if WXWIN_COMPATIBILITY_3_2
wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
inline bool operator==(wxPenStyle s, wxDeprecatedGUIConstants t)
{
@ -145,4 +147,6 @@ inline bool operator!=(wxPenStyle s, wxDeprecatedGUIConstants t)
return static_cast<int>(s) != static_cast<int>(t);
}
#endif // WXWIN_COMPATIBILITY_3_2
#endif // _WX_PEN_H_BASE_