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:
Vadim Zeitlin
2021-04-25 17:50:37 +02:00
parent 5ab5172930
commit 3d278ee75f
5 changed files with 39 additions and 4 deletions

View File

@@ -345,6 +345,8 @@ enum wxTextBoxAttrPosition
wxTEXT_BOX_ATTR_POSITION_MASK = 0x00F0
};
wxALLOW_COMBINING_ENUMS(wxTextAttrUnits, wxTextAttrValueFlags)
/**
@class wxTextAttrDimension