lemire / FastPFor

The FastPFOR C++ library: Fast integer compression
Apache License 2.0
873 stars 123 forks source link

Avoid multiple redefinition when including codecfactory.h from different .cpp #92

Closed lemire closed 1 year ago

lemire commented 1 year ago

Some users include multiple versions of CODECFactory in their projects. This is almost surely a sign of unsafe code. You should have at most one CODECFactory per project. Nevertheless, let us make it a bit cleaner by using a source file.

Plus some random pedantic fixes.

Simpler fix than https://github.com/lemire/FastPFor/pull/91 where a member reference to a static function variable was used.