mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Small optimization.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
|
||||
|
||||
* src/key-list.cc (Key_List::output_lookup_function_body): Avoid
|
||||
emitting the loop for dealing with duplicates if
|
||||
total_duplicates == 0.
|
||||
|
||||
* src/key-list.cc (Key_List::read_keys): Don't accept an empty key.
|
||||
|
||||
* src/Makefile.in (install, installdirs, uninstall): Respect
|
||||
|
||||
@@ -1675,6 +1675,8 @@ Key_List::output_lookup_function_body (const Output_Compare& comparison)
|
||||
indent -= 4;
|
||||
printf ("%*s }\n", indent, "");
|
||||
}
|
||||
if (total_duplicates > 0)
|
||||
{
|
||||
printf ("%*s else if (index < -TOTAL_KEYWORDS)\n"
|
||||
"%*s {\n"
|
||||
"%*s register int offset = - 1 - TOTAL_KEYWORDS - index;\n",
|
||||
@@ -1726,9 +1728,11 @@ Key_List::output_lookup_function_body (const Output_Compare& comparison)
|
||||
indent, "");
|
||||
printf ("%*s wordptr++;\n"
|
||||
"%*s }\n"
|
||||
"%*s }\n"
|
||||
"%*s}\n",
|
||||
indent, "", indent, "", indent, "", indent, "");
|
||||
"%*s }\n",
|
||||
indent, "", indent, "", indent, "");
|
||||
}
|
||||
printf ("%*s}\n",
|
||||
indent, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user