diff options
Diffstat (limited to 'storage/ndb/src/common/util/Bitmask.cpp')
-rw-r--r-- | storage/ndb/src/common/util/Bitmask.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/storage/ndb/src/common/util/Bitmask.cpp b/storage/ndb/src/common/util/Bitmask.cpp index cdcc7862e25..edfe2363039 100644 --- a/storage/ndb/src/common/util/Bitmask.cpp +++ b/storage/ndb/src/common/util/Bitmask.cpp @@ -16,21 +16,6 @@ #include <Bitmask.hpp> #include <NdbOut.hpp> -static -void print(const Uint32 src[], Uint32 len, Uint32 pos = 0) -{ - printf("b'"); - for(unsigned i = 0; i<len; i++) - { - if(BitmaskImpl::get((pos + len + 31) >> 5, src, i+pos)) - printf("1"); - else - printf("0"); - if((i & 31) == 31) - printf(" "); - } -} - void BitmaskImpl::getFieldImpl(const Uint32 src[], unsigned shiftL, unsigned len, Uint32 dst[]) @@ -93,6 +78,22 @@ BitmaskImpl::setFieldImpl(Uint32 dst[], } #ifdef __TEST_BITMASK__ +static +void print(const Uint32 src[], Uint32 len, Uint32 pos = 0) +{ + printf("b'"); + for(unsigned i = 0; i<len; i++) + { + if(BitmaskImpl::get((pos + len + 31) >> 5, src, i+pos)) + printf("1"); + else + printf("0"); + if((i & 31) == 31) + printf(" "); + } +} + + #define DEBUG 0 #include <Vector.hpp> static void do_test(int bitmask_size); |