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

Commit d9242533 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Jakub Pawlowski
Browse files

Fix clang-tidy performance warnings in system/bt.

* Use more efficient overloaded string methods.

Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: Iff759bf68ede3bb6bdd8e332b3490128eee3b5fe
parent 26326c17
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -172,7 +172,7 @@ void config_set_string(config_t* config, const std::string& section,
  }
  }


  std::string value_no_newline;
  std::string value_no_newline;
  size_t newline_position = value.find("\n");
  size_t newline_position = value.find('\n');
  if (newline_position != std::string::npos) {
  if (newline_position != std::string::npos) {
    android_errorWriteLog(0x534e4554, "70808273");
    android_errorWriteLog(0x534e4554, "70808273");
    value_no_newline = value.substr(0, newline_position);
    value_no_newline = value.substr(0, newline_position);