setFlag

Sets or clears a flag in a value based on the provided state.

static pure @nogc
void
setFlag
(
T
)
(
ref T value
,,
bool state
)

Parameters

value T

Reference to the value where the flag will be modified.

flag T

The flag to set or clear.

state bool

A boolean indicating whether to set or clear the flag.

Meta