Skip to content

[Request] Enum bit flags #66

Description

@OriolCS2

Hello,

I would like to reopen how AngelScript handles bitwise operations on enums, as discussed previously in this community: https://gamedev.net/forums/topic/709510-enum-bit-flags/

While I understand the technical reasoning that (Flag_A | Flag_B) results in a numeric value that might not be explicitly defined as a single member of the enum forcing an explicit cast like MyEnum(Flag_A | Flag_B) it is not an easy way to remember.

Also my main point to request the feature bitfield is because creating an API is much more clearer if the declaration of a method looks like SetFlags(EntityFlags flags) and not like SetFlags(uint flags). The user will understand faster what he is expected to use.

Thanks for your time again!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already exists

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions