As you know, C++ standard does not explicitly define how many bits should be there in char or int. And while currently, in absolute majority of cases, it is 8 and 32 bits respectively, leaving the things as is a potential way to shoot yourself in a leg.
sizeof operatorfundamental types
And while we can follow this rule and change everything, I believe that we should start with protocol first. Because compiling unit-e on a system, which uses 16 bit int, or a char that is >8 bits will break the CBloomFilter.
As you know, C++ standard does not explicitly define how many bits should be there in
char
orint
. And while currently, in absolute majority of cases, it is 8 and 32 bits respectively, leaving the things as is a potential way to shoot yourself in a leg. sizeof operator fundamental typesAnd while we can follow this rule and change everything, I believe that we should start with protocol first. Because compiling unit-e on a system, which uses 16 bit int, or a char that is >8 bits will break the CBloomFilter.
Signed-off-by: Aleksandr Mikhailov aleksandr@thirdhash.com