mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 11:45:42 +00:00
Cosmetic rename for more clarity
This commit is contained in:
parent
888a5aa82d
commit
43bbe48e5f
@ -96,7 +96,7 @@ template loopOverWords(lhs, rhs: BitSeq,
|
|||||||
template lastWordBytes(bitseq): auto =
|
template lastWordBytes(bitseq): auto =
|
||||||
Bytes(bitseq).toOpenArray(firstByteOfLastWord, lastByteOfLastWord)
|
Bytes(bitseq).toOpenArray(firstByteOfLastWord, lastByteOfLastWord)
|
||||||
|
|
||||||
template initBitsVars =
|
template initLastWords =
|
||||||
lhsWord = loadLEBytes(WordType, lastWordBytes(lhs))
|
lhsWord = loadLEBytes(WordType, lastWordBytes(lhs))
|
||||||
when hasRhs: rhsWord = loadLEBytes(WordType, lastWordBytes(rhs))
|
when hasRhs: rhsWord = loadLEBytes(WordType, lastWordBytes(rhs))
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ template loopOverWords(lhs, rhs: BitSeq,
|
|||||||
firstByteOfLastWord = bytesCount - lastWordSize
|
firstByteOfLastWord = bytesCount - lastWordSize
|
||||||
lastByteOfLastWord = bytesCount - 1
|
lastByteOfLastWord = bytesCount - 1
|
||||||
|
|
||||||
initBitsVars()
|
initLastWords()
|
||||||
let markerPos = log2trunc(lhsWord)
|
let markerPos = log2trunc(lhsWord)
|
||||||
when hasRhs: doAssert log2trunc(rhsWord) == markerPos
|
when hasRhs: doAssert log2trunc(rhsWord) == markerPos
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user