1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Omit the multicompare code output if it is not needed.

This commit is contained in:
Bruno Haible
2003-04-14 10:18:32 +00:00
parent 6bbdde4f5f
commit 5e30c2698e
3 changed files with 6 additions and 14 deletions

View File

@@ -1334,7 +1334,7 @@ Output::output_lookup_function_body (const Output_Compare& comparison) const
printf (" if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)\n"
" {\n");
if (option[DUP])
if (option[DUP] && _total_duplicates > 0)
{
if (option[LENTABLE])
printf (" register %s%s *lengthptr;\n",
@@ -1358,7 +1358,7 @@ Output::output_lookup_function_body (const Output_Compare& comparison) const
output_switches (_head, num_switches, switch_size, _min_hash_value, _max_hash_value, 10);
if (option[DUP])
if (option[DUP] && _total_duplicates > 0)
{
int indent = 8;
printf ("%*s return 0;\n"