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

Commit 453028a2 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

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

parents bc3923f8 209c988c
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);
    }