Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 209c988c authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Chih-hung Hsieh
Browse files

Fix clang-tidy performance-faster-string-find warnings

Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: I4e22d4a840fc293050fec62b7bfda5863671540e
parent d578bbd3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ namespace V1_2 {
namespace clearkey {

std::string MemoryFileSystem::GetFileName(const std::string& path) {
    size_t index = path.find_last_of("/");
    size_t index = path.find_last_of('/');
    if (index != std::string::npos) {
        return path.substr(index+1);
    } else {
+1 −1
Original line number Diff line number Diff line
@@ -493,7 +493,7 @@ MediaCodecsXmlParser::Impl::Parser::Parser(State *state, std::string path)
      mPath(path),
      mStatus(NO_INIT) {
    // determine href_base
    std::string::size_type end = path.rfind("/");
    std::string::size_type end = path.rfind('/');
    if (end != std::string::npos) {
        mHrefBase = path.substr(0, end + 1);
    }