Skip to content

ConfigFlags Are Not Flags #21

@martindevans

Description

@martindevans

The ConfigFlags enum contains flags which can be combined together like so:

var config = ConfigFlags.FLAG_WINDOW_RESIZABLE | ConfigFlags.FLAG_WINDOW_HIGHDPI
           | ConfigFlags.FLAG_MSAA_4X_HINT | ConfigFlags.FLAG_VSYNC_HINT

However doing that can trigger warning from linters:

Bitwise operation on enum that is not marked by the [Flags] attribute

To fix this, ConfigFlags should be tagged with [FlagsAttribute].

Normally I would submit a PR for this fix, but I assume it should be made in a code-gen script somewhere, not in the source itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions