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

Commit 320f6343 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge \"Fix clang-tidy performance warnings in crash_reporter.\"

am: 5dd9dc58

Change-Id: Ibc5b64b14e021925187c33ad048f332438309414
parents 1cbd1f50 5dd9dc58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ bool CrashCollector::CheckHasCapacity(const FilePath &crash_directory) {
      continue;

    std::string filename(ent->d_name);
    size_t last_dot = filename.rfind(".");
    size_t last_dot = filename.rfind('.');
    std::string basename;
    // If there is a valid looking extension, use the base part of the
    // name.  If the only dot is the first byte (aka a dot file), treat
+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ TEST_F(KernelCollectorTest, CollectOK) {
  pos += strlen(kNamePrefix);
  std::string filename = log.substr(pos, std::string::npos);
  // Take the name up until \n
  size_t end_pos = filename.find_first_of("\n");
  size_t end_pos = filename.find_first_of('\n');
  ASSERT_NE(std::string::npos, end_pos);
  filename = filename.substr(0, end_pos);
  ASSERT_EQ(0U, filename.find(test_crash_directory().value()));