MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ToggleBit

Function ToggleBit

src/core/bitmath_func.hpp:157–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 */
156template <typename T>
157constexpr T ToggleBit(T &x, const uint8_t y)
158{
159 return x = (T)(x ^ ((T)1U << y));
160}
161
162/**
163 * Assigns a bit in a variable.

Callers 15

OnClickMethod · 0.85
MenuClickSettingsFunction · 0.85
CmdRailTrackHelperFunction · 0.85
CmdSignalTrackHelperFunction · 0.85
ToggleTransparencyFunction · 0.85
ToggleInvisibilityFunction · 0.85
ToggleTransparencyLockFunction · 0.85
ToggleSnowOrDesertFunction · 0.85
UpdateVisualEffectMethod · 0.85
CmdBuildObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected