File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2229,9 +2229,9 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
2229
2229
#line 735 "cpp2regex.h2"
2230
2230
[[nodiscard]] auto parse_context::grab_n (cpp2::impl::in<int > n, cpp2::impl::out<std::string> r) & -> bool
2231
2231
{
2232
- if (cpp2::impl::cmp_less_eq (pos + n ,regex.size ())) {
2233
- r.construct (regex.substr (pos, n ));
2234
- pos += n - 1 ;
2232
+ if (cpp2::impl::cmp_less_eq (pos + cpp2::impl::as_< size_t >(n) ,regex.size ())) {
2233
+ r.construct (regex.substr (pos, cpp2::impl::as_< size_t >(n) ));
2234
+ pos += (cpp2::impl::as_< size_t >(n)) - 1 ;
2235
2235
return true ;
2236
2236
}
2237
2237
else {
@@ -2412,7 +2412,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
2412
2412
2413
2413
#line 920 "cpp2regex.h2"
2414
2414
auto generation_function_context::remove_tabs (cpp2::impl::in<int > c) & -> void{
2415
- tabs = tabs.substr (0 , c * 2 );
2415
+ tabs = tabs.substr (0 , (cpp2::impl::as_< size_t >(c)) * 2 );
2416
2416
}
2417
2417
2418
2418
generation_function_context::generation_function_context (auto const & code_, auto const & tabs_)
Original file line number Diff line number Diff line change @@ -734,9 +734,9 @@ parse_context: type =
734
734
735
735
grab_n: (inout this, in n: int, out r: std::string) -> bool =
736
736
{
737
- if pos + n <= regex..size() {
738
- r = regex..substr(pos, n);
739
- pos += n - 1;
737
+ if pos + n as size_t <= regex..size() {
738
+ r = regex..substr(pos, n as size_t );
739
+ pos += (n as size_t) - 1;
740
740
return true;
741
741
}
742
742
else {
@@ -918,7 +918,7 @@ generation_function_context: @struct type = {
918
918
}
919
919
920
920
remove_tabs: (inout this, c: int) = {
921
- tabs = tabs..substr(0, c * 2);
921
+ tabs = tabs..substr(0, (c as size_t) * 2);
922
922
}
923
923
}
924
924
You can’t perform that action at this time.
0 commit comments