| 1228 | } |
| 1229 | |
| 1230 | void Integer::SetBit(unsigned int n, bool value) |
| 1231 | { |
| 1232 | if (value) |
| 1233 | { |
| 1234 | reg.CleanGrow(RoundupSize(bitsToWords(n+1))); |
| 1235 | reg[n/WORD_BITS] |= (word(1) << (n%WORD_BITS)); |
| 1236 | } |
| 1237 | else |
| 1238 | { |
| 1239 | if (n/WORD_BITS < reg.size) |
| 1240 | reg[n/WORD_BITS] &= ~(word(1) << (n%WORD_BITS)); |
| 1241 | } |
| 1242 | } |
| 1243 | |
| 1244 | byte Integer::GetByte(unsigned int n) const |
| 1245 | { |
no test coverage detected