| 2900 | } |
| 2901 | |
| 2902 | void 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 | |
| 2916 | byte Integer::GetByte(size_t n) const |
| 2917 | { |
no test coverage detected