]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/keyword.cc
* python/convertrules.py (string_or_scheme): Fix spelling error
[lilypond.git] / lily / keyword.cc
index de6aca9e495cd7a6c6496384a0c3d7e2d6b377ca..70c84e59e2a6bfc9719f08dd62d41a171ba51444 100644 (file)
@@ -1,13 +1,14 @@
 /*
   keyword.cc -- keywords and identifiers
- */
-#include <string.h>
-#include <stdlib.h>
+*/
+
 #include "keyword.hh"
 
+#include <cstring>
+#include <cstdlib>
 
 /* for qsort */
-int tabcmp (Keyword_ent  const &p1, Keyword_ent const &p2)
+int tabcmp (Keyword_ent const &p1, Keyword_ent const &p2)
 {
   return strcmp (p1.name_, p2.name_);
 }
@@ -15,9 +16,7 @@ int tabcmp (Keyword_ent  const &p1, Keyword_ent const &p2)
 Keyword_table::Keyword_table (Keyword_ent *tab)
 {
   while (tab->name_)
-    {
-      table_.push (*tab++);
-    }
+    table_.push (*tab++);
 
   table_.sort (tabcmp);
 }
@@ -25,8 +24,8 @@ Keyword_table::Keyword_table (Keyword_ent *tab)
 int
 Keyword_table::lookup (char const *s) const
 {
-  Keyword_ent e ;
-  e.name_ =  s;
+  Keyword_ent e;
+  e.name_ = s;
   int idx = binary_search (table_, e, tabcmp);
   if (idx >= 0)
     return table_[idx].tokcode_;