Mercurial > hg > svcore
changeset 1076:106081811ccd
Avoid compiler warning
author | Chris Cannam |
---|---|
date | Wed, 10 Jun 2015 13:08:30 +0100 |
parents | 882d448c8a6d |
children | ec6e7f0f3f5b |
files | base/ResizeableBitset.h |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/base/ResizeableBitset.h Fri May 15 09:15:57 2015 +0100 +++ b/base/ResizeableBitset.h Wed Jun 10 13:08:30 2015 +0100 @@ -62,7 +62,10 @@ } void set(size_t column) { - ((*m_bits)[column >> 3]) |= uint8_t((1u << (column & 0x07)) & 0xff); + size_t ix = (column >> 3); + uint8_t prior = (*m_bits)[ix]; + uint8_t extra = ((1u << (column & 0x07)) & 0xff); + (*m_bits)[ix] = uint8_t(prior | extra); } void reset(size_t column) {