FastFilter / xor_singleheader

Header-only binary fuse and xor filter library
Apache License 2.0
348 stars 32 forks source link

Don't use nonstandard variable-length arrays #48

Closed uckelman-sf closed 1 year ago

uckelman-sf commented 1 year ago

We see the following warning when compiling:

./vendors/xor_singleheader/include/binaryfusefilter.h:642:51: warning: ISO C++ forbids variable length array [-Wvla]
  642 |       memset(reverseOrder, 0, sizeof(uint64_t[size]));
      |           

Standard C++ forbids variable-length arrays; but they're not needed here to begin with---just multiply the size of the element type by the length of the array.

lemire commented 1 year ago

Merging.