1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Don't include the length in the hash function if all keywords have the same

length.
This commit is contained in:
Bruno Haible
2009-01-19 09:50:07 +00:00
parent 7fac4aa2b6
commit 57745086ac
9 changed files with 144 additions and 113 deletions

View File

@@ -2,7 +2,7 @@
/* Search algorithm.
Copyright (C) 1989-1998, 2000, 2002 Free Software Foundation, Inc.
Copyright (C) 1989-1998, 2000, 2002, 2009 Free Software Foundation, Inc.
Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
and Bruno Haible <bruno@clisp.org>.
@@ -113,6 +113,9 @@ public:
/* Minimum length of the shortest keyword. */
int _min_key_len;
/* Whether the hash function includes the length. */
bool _hash_includes_len;
/* User-specified or computed key positions. */
Positions _key_positions;