Skip to content

Commit

Permalink
docs: Added information about maximum number of enum flags
Browse files Browse the repository at this point in the history
A 32-bit signed integer is used to store the flags, which has maximum
value 2147483647. Hence, the 31st flag, which would have the value
2147483648, can not be represented.
  • Loading branch information
bjorn committed Apr 25, 2023
1 parent e4c36b9 commit 2a8fc6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/manual/custom-properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ the index of the current value in the list of values. The former is more
readable whereas the latter could easier and more efficient to load.

Finally, an enum can also allow multiple values to be chosen. In this case
each option is displayed with checkbox. When saving as string, a
each option is displayed with a checkbox. When saving as string, a
comma-separated list is used and when saving as number the selected indexes are
encoded as bitflags.
encoded as bitflags. In both cases, the maximum number of flags supported is 30,
since internally a 32-bit signed integer is used to store the value.

.. _custom-classes:

Expand Down

0 comments on commit 2a8fc6e

Please sign in to comment.