mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
Use char version of rfind.
There is only a single character involved, so use the char version. This was found via `clang-tidy`.
This commit is contained in:
parent
5a16d3ef7f
commit
6d6b614924
|
@ -614,7 +614,7 @@ namespace datalog {
|
|||
|
||||
std::string get_file_name_without_extension(std::string name) {
|
||||
size_t slash_index = name.find_last_of("\\/");
|
||||
size_t dot_index = name.rfind(".");
|
||||
size_t dot_index = name.rfind('.');
|
||||
size_t ofs = (slash_index==std::string::npos) ? 0 : slash_index+1;
|
||||
size_t count = (dot_index!=std::string::npos && dot_index>ofs) ?
|
||||
(dot_index-ofs) : std::string::npos;
|
||||
|
|
Loading…
Reference in a new issue