MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / to_string

Method to_string

src/Core/include/OpenLoco/Core/BitSet.hpp:388–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386
387 template<class TChar = char, class TTraits = std::char_traits<TChar>, class TAlloc = std::allocator<TChar>>
388 std::basic_string<TChar, TTraits, TAlloc> to_string(TChar zero = TChar{ '0' }, TChar one = TChar{ '1' }) const
389 {
390 std::basic_string<TChar, TTraits, TAlloc> res;
391 res.resize(TBitSize);
392 for (size_t i = 0; i < TBitSize; ++i)
393 {
394 // Printed as little-endian.
395 res[TBitSize - i - 1] = get(i) ? one : zero;
396 }
397 return res;
398 }
399
400 constexpr BitSet operator^(const BitSet& other) const noexcept
401 {

Callers

nothing calls this directly

Calls 2

getFunction · 0.50
resizeMethod · 0.45

Tested by

no test coverage detected