8000 Minor: add back a static_cast removed in the prior merge · gianricardo/docopt.cpp@1712450 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1712450

Browse files
committed
Minor: add back a static_cast removed in the prior merge
1 parent 52e3064 commit 1712450

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docopt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ std::vector<Option> parse_defaults(std::string const& doc) {
531531

532532
std::vector<Option> defaults;
533533
for (auto s : parse_section("options:", doc)) {
534-
s.erase(s.begin(), s.begin() + s.find(':') + 1); // get rid of "options:"
534+
s.erase(s.begin(), s.begin() + static_cast<std::ptrdiff_t>(s.find(':')) + 1); // get rid of "options:"
535535

536536
for (const auto& opt : regex_split(s, re_delimiter)) {
537537
if (starts_with(opt, "-")) {

0 commit comments

Comments
 (0)
0