MCPcopy Create free account
hub / github.com/c3d/tao3D / SetBit

Method SetBit

libcryptopp/cryptopp/integer.cpp:2902–2914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2900}
2901
2902void Integer::SetBit(size_t n, bool value)
2903{
2904 if (value)
2905 {
2906 reg.CleanGrow(RoundupSize(BitsToWords(n+1)));
2907 reg[n/WORD_BITS] |= (word(1) << (n%WORD_BITS));
2908 }
2909 else
2910 {
2911 if (n/WORD_BITS < reg.size())
2912 reg[n/WORD_BITS] &= ~(word(1) << (n%WORD_BITS));
2913 }
2914}
2915
2916byte Integer::GetByte(size_t n) const
2917{

Callers 1

Power2Method · 0.45

Calls 4

RoundupSizeFunction · 0.85
BitsToWordsFunction · 0.85
CleanGrowMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected