@@ -119,7 +119,7 @@ bool LeafPattern::match(PatternList& left, std::vector<std::shared_ptr<LeafPatte
119119 return false ;
120120 }
121121
122- left.erase (left.begin ()+static_cast <ssize_t >(match.first ));
122+ left.erase (left.begin ()+static_cast <ptrdiff_t >(match.first ));
123123
124124 auto same_name = std::find_if (collected.begin (), collected.end (), [&](std::shared_ptr<LeafPattern> const & p) {
125125 return p->name ()==name ();
@@ -170,7 +170,7 @@ Option Option::parse(std::string const& option_description)
170170 auto double_space = option_description.find (" " );
171171 auto options_end = option_description.end ();
172172 if (double_space != std::string::npos) {
173- options_end = option_description.begin () + static_cast <ssize_t >(double_space);
173+ options_end = option_description.begin () + static_cast <ptrdiff_t >(double_space);
174174 }
175175
176176 static const std::regex pattern {" (-{1,2})?(.*?)([,= ]|$)" };
@@ -512,7 +512,7 @@ class Tokens {
512512 std::string the_rest () const {
513513 if (!*this )
514514 return {};
515- return join (fTokens .begin ()+static_cast <ssize_t >(fIndex ),
515+ return join (fTokens .begin ()+static_cast <ptrdiff_t >(fIndex ),
516516 fTokens .end (),
517517 " " );
518518 }
@@ -920,7 +920,7 @@ static std::vector<Option> parse_defaults(std::string const& doc) {
920920 std::vector<Option> defaults;
921921
922922 for (auto s : parse_section (" options:" , doc)) {
923- s.erase (s.begin (), s.begin ()+static_cast <ssize_t >(s.find (' :' ))+1 ); // get rid of "options:"
923+ s.erase (s.begin (), s.begin ()+static_cast <ptrdiff_t >(s.find (' :' ))+1 ); // get rid of "options:"
924924
925925 std::for_each (std::sregex_iterator{ s.begin (), s.end (), pattern },
926926 std::sregex_iterator{},
0 commit comments