diff base/ResizeableBitset.h @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents f3c97321e43d
children 106081811ccd
line wrap: on
line diff
--- a/base/ResizeableBitset.h	Tue Mar 03 09:33:59 2015 +0000
+++ b/base/ResizeableBitset.h	Tue Mar 03 15:18:24 2015 +0000
@@ -62,11 +62,11 @@
     }
     
     void set(size_t column) {
-        ((*m_bits)[column >> 3]) |=  (uint8_t(1) << (column & 0x07));
+        ((*m_bits)[column >> 3]) |= uint8_t((1u << (column & 0x07)) & 0xff);
     }
 
     void reset(size_t column) {
-        ((*m_bits)[column >> 3]) &= ~(uint8_t(1) << (column & 0x07));
+        ((*m_bits)[column >> 3]) &= uint8_t((~(1u << (column & 0x07))) & 0xff);
     }
 
     void copy(size_t source, size_t dest) {