Const uint32_t pointer
elshize opened this issue · comments
Michał Siedlaczek commented
Hi,
I believe you could (and should) make the input pointer const. As far as I can tell, only two signatures must be changed:
size_t streamvbyte_encode(const uint32_t *in, uint32_t length, uint8_t *out);
size_t streamvbyte_encode_quad(const uint32_t *in, uint8_t *outData, uint8_t *outKey);
instead of
size_t streamvbyte_encode(uint32_t *in, uint32_t length, uint8_t *out);
size_t streamvbyte_encode_quad(uint32_t *in, uint8_t *outData, uint8_t *outKey);
I found myself in the need of casting away the const because of this.
Daniel Lemire commented
Fixed as per 4aa9c3b