Avoid warnings about operations on different enums in C++20 mode
Arithmetic operations on the elements of different enums are deprecated in C++20 and the latest compiler versions warn about them. While individual warnings could be fixed in wxWidgets itself (although it would be quite an effort to do it for all ~500 of them), it wouldn't help with the same warnings in the applications using wx, so prefer to do it by explicitly defining the operations on the enums that can be combined with each other by using wxALLOW_COMBINING_ENUMS() macro, except for a single warning in wxTar code where it's easier to just not use an anum at all.
This commit is contained in:
@@ -345,6 +345,8 @@ enum wxTextBoxAttrPosition
|
||||
wxTEXT_BOX_ATTR_POSITION_MASK = 0x00F0
|
||||
};
|
||||
|
||||
wxALLOW_COMBINING_ENUMS(wxTextAttrUnits, wxTextAttrValueFlags)
|
||||
|
||||
/**
|
||||
@class wxTextAttrDimension
|
||||
|
||||
|
Reference in New Issue
Block a user