diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/include/boost/openmethod/policies/minimal_perfect_hash.hpp b/include/boost/openmethod/policies/minimal_perfect_hash.hpp index b9e93a0..7a693ca 100644 --- a/include/boost/openmethod/policies/minimal_perfect_hash.hpp +++ b/include/boost/openmethod/policies/minimal_perfect_hash.hpp @@ -313,6 +313,7 @@ void minimal_perfect_hash::fn::initialize( // Check if this displacement works for all keys in group std::vector positions; + positions.reserve(groups[g].size()); bool valid = true; for (auto key : groups[g]) { auto pilot = (mult * reinterpret_cast(key)) >> shift;