@@ -24,7 +24,7 @@ int main()
2424int errorcode;
2525 PCRE2_SIZE erroroffset;
2626
27- const PCRE2_SPTR pattern =( PCRE2_SPTR) R"( \[([^ ]{8}) \| ([^\]]{19})\] \((?:[^,]+, )?\d+\) [^ ]+ \[([^\]]+)\] RQST END \[[^\]]+\] *(\d+) ms)" ;
27+ const PCRE2_SPTR pattern =reinterpret_cast < PCRE2_SPTR>( R"( \[([^ ]{8}) \| ([^\]]{19})\] \((?:[^,]+, )?\d+\) [^ ]+ \[([^\]]+)\] RQST END \[[^\]]+\] *(\d+) ms)" ) ;
2828 pcre2_code* re =pcre2_compile (pattern, PCRE2_ZERO_TERMINATED,0 , &errorcode, &erroroffset,nullptr );
2929
3030if (!re) {
@@ -65,16 +65,16 @@ int main()
6565 }
6666
6767for (auto line : lines) {
68- const PCRE2_SPTR subject =( PCRE2_SPTR) line.c_str ();
68+ const PCRE2_SPTR subject =reinterpret_cast < PCRE2_SPTR>( line.c_str () );
6969const int rc =pcre2_jit_match (re, subject, line.size (),0 ,0 , match_data, mcontext);
7070
7171if (rc >1 ) {
7272const PCRE2_SIZE* ovector =pcre2_get_ovector_pointer (match_data);
7373
7474for (int i =1 ; i < rc; ++i) {
7575const PCRE2_SPTR substring_start = subject + ovector[2 *i];
76- const int substring_length = ovector[2 *i +1 ] - ovector[2 *i];
77- const std::string_view s{( const char *) substring_start, ( std::size_t ) substring_length};
76+ const int substring_length =static_cast < int >( ovector[2 *i +1 ] - ovector[2 *i]) ;
77+ const std::string_view s{reinterpret_cast < const char *>( substring_start), static_cast < std::string_view::size_type>( substring_length) };
7878 std::cout <<" MATCH" << i <<" :\" " << s <<" \" " << std::endl;
7979 }
8080 }