]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/getopt-long.cc
Avoid implicit sign conversion
[lilypond.git] / flower / getopt-long.cc
index 915509b272882cfb43d6fed9fb050a9624b75fd9..2ade561cce3f9209584825ae41b592737822d4cc 100644 (file)
@@ -54,7 +54,7 @@ Getopt_long::parselong ()
   assert (*optnm);
 
   char const *endopt = strchr (optnm, '=');
-  int searchlen = (endopt) ? endopt - optnm : strlen (optnm);
+  size_t searchlen = (endopt) ? (size_t) (endopt - optnm) : strlen (optnm);
 
   found_option_ = 0;
   for (int i = 0; i < table_len_; i++)
@@ -314,9 +314,9 @@ Long_option_init::table_string (Long_option_init *l)
 {
   string tabstr = "";
 
-  int wid = 0;
+  size_t wid = 0;
   for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++)
-    wid = max (int (wid), int (l[i].str_for_help ().length ()));
+    wid = max (wid, l[i].str_for_help ().length ());
 
   for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++)
     {