X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fkeyword.cc;h=84065ab4f6fd0093f621e0d87d3a351b9f027ab3;hb=9f3572d98bb948c9689cd1f75401a029451fa001;hp=b5f7947ada203e31550ee041a557f37f439b115c;hpb=04265f11d1f21416ccebd2dcaa1d903dc781b36e;p=lilypond.git diff --git a/lily/keyword.cc b/lily/keyword.cc index b5f7947ada..84065ab4f6 100644 --- a/lily/keyword.cc +++ b/lily/keyword.cc @@ -9,9 +9,9 @@ using namespace std; /* for qsort */ -bool tab_less (Keyword_ent const &p1, Keyword_ent const &p2) +int tabcmp (Keyword_ent const &p1, Keyword_ent const &p2) { - return strcmp (p1.name_, p2.name_) < 0; + return strcmp (p1.name_, p2.name_); } Keyword_table::Keyword_table (Keyword_ent *tab) @@ -19,7 +19,7 @@ Keyword_table::Keyword_table (Keyword_ent *tab) while (tab->name_) table_.push_back (*tab++); - vector_sort (table_, tab_less); + vector_sort (table_, tabcmp); } vsize @@ -27,7 +27,7 @@ Keyword_table::lookup (char const *s) const { Keyword_ent e; e.name_ = s; - vsize idx = binary_search (table_, e, tab_less); + vsize idx = binary_search (table_, e, tabcmp); if (idx != VPOS) return table_[idx].tokcode_; return VPOS;