X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Fgetopt-long.cc;h=9adc0c3592d2a2de84ea96e7e4b6935988ec4479;hb=a6a51abfd0195a3cf7d6ea095cf69808852f21ce;hp=dbabcbcf08111e6ea5f9193b925296193b2e9f42;hpb=a42aaa559b71ce5776795fa11a7e1df9110d85b7;p=lilypond.git diff --git a/flower/getopt-long.cc b/flower/getopt-long.cc index dbabcbcf08..9adc0c3592 100644 --- a/flower/getopt-long.cc +++ b/flower/getopt-long.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1996--2011 Han-Wen Nienhuys, + Copyright (C) 1996--2015 Han-Wen Nienhuys, LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ Getopt_long::parselong () assert (*optnm); char const *endopt = strchr (optnm, '='); - size_t 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++) @@ -103,11 +103,11 @@ Long_option_init::to_string () const { string str; if (shortname_char_) - str += "-" + shortname_char_; + str += string ("-") + shortname_char_; if (shortname_char_ && longname_str0_) str += ", "; if (longname_str0_) - str += string ("`--") + longname_str0_ + "'"; + str += string ("--") + longname_str0_; return str; } @@ -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++) {