Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenTTD/OpenTTD
/ HasAtMostOneBit
Function
HasAtMostOneBit
src/core/bitmath_func.hpp:266–269 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
264
*/
265
template <typename T>
266
constexpr bool HasAtMostOneBit(T value)
267
{
268
return (value & (value - 1)) == 0;
269
}
270
271
/**
272
* Iterable ensemble of each set bit in a value.
Callers
8
GetNewCargoTypeForReplace
Function · 0.85
ExploreSegment
Function · 0.85
NeedsServicing
Method · 0.85
MaskWireBits
Function · 0.85
ShowRefitOptionsList
Function · 0.85
DrawRoadBits
Function · 0.85
TileLoop_Road
Function · 0.85
AreOrderFlagsValid
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected