mirror of
https://github.com/boostorg/openmethod.git
synced 2026-01-19 04:22:12 +00:00
Optimize positions vector allocation with reserve()
Co-authored-by: jll63 <5083077+jll63@users.noreply.github.com>
This commit is contained in:
1
_codeql_detected_source_root
Symbolic link
1
_codeql_detected_source_root
Symbolic link
@@ -0,0 +1 @@
|
||||
.
|
||||
@@ -313,6 +313,7 @@ void minimal_perfect_hash::fn<Registry>::initialize(
|
||||
|
||||
// Check if this displacement works for all keys in group
|
||||
std::vector<std::size_t> positions;
|
||||
positions.reserve(groups[g].size());
|
||||
bool valid = true;
|
||||
for (auto key : groups[g]) {
|
||||
auto pilot = (mult * reinterpret_cast<detail::uintptr>(key)) >> shift;
|
||||
|
||||
Reference in New Issue
Block a user