Function operator<<=

Synopsis

#include <include/EASTL/bitset.h>

void operator<<=(size_type n)

Description

No description yet.

Source

Lines 744-763 in include/EASTL/bitset.h. Line 118 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline void BitsetBase<NW, WordType>::operator<<=(size_type n)
{
    const size_type nWordShift = (size_type)(n >> kBitsPerWordShift);
    if(nWordShift)
    {
        for(int i = (int)(NW - 1); i >= 0; --i)
            mWord[i] = (nWordShift <= (size_type)i) ? mWord[i - nWordShift] : (word_type)0;
    }
    if(n &= kBitsPerWordMask)
    {
        for(size_t i = (NW - 1); i > 0; --i)
            mWord[i] = (word_type)((mWord[i] << n) | (mWord[i - 1] >> (kBitsPerWord - n)));
        mWord[0] <<= n;
    }
    // We let the parent class turn off any upper bits.
}





Add Discussion as Guest

Log in