From 6d6b61492456af67958d23b8ea22d6833e4e3ff9 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 30 Jan 2018 21:45:12 +0700 Subject: [PATCH] Use char version of rfind. There is only a single character involved, so use the char version. This was found via `clang-tidy`. --- src/muz/base/dl_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/muz/base/dl_util.cpp b/src/muz/base/dl_util.cpp index fad424b90..787dc6cfa 100644 --- a/src/muz/base/dl_util.cpp +++ b/src/muz/base/dl_util.cpp @@ -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;