From 2b4eb676348f122ab0a21e19d7a3c57bd9898c6c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 12 Jun 2024 09:30:37 +0000 Subject: Use C++20 `string{,_view}::{starts,ends}_with()`, part 2. Replace uses of `android::base::{Starts,Ends}With()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I80a0ca93f433464270989d248dd999e9366a1c17 --- artd/path_utils.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'artd/path_utils.cc') diff --git a/artd/path_utils.cc b/artd/path_utils.cc index 5c6ad9dc02..8348a7605d 100644 --- a/artd/path_utils.cc +++ b/artd/path_utils.cc @@ -23,7 +23,6 @@ #include "aidl/com/android/server/art/BnArtd.h" #include "android-base/errors.h" #include "android-base/result.h" -#include "android-base/strings.h" #include "arch/instruction_set.h" #include "base/file_utils.h" #include "base/macros.h" @@ -45,7 +44,6 @@ using ::aidl::com::android::server::art::OutputProfile; using ::aidl::com::android::server::art::ProfilePath; using ::aidl::com::android::server::art::RuntimeArtifactsPath; using ::aidl::com::android::server::art::VdexPath; -using ::android::base::EndsWith; using ::android::base::Error; using ::android::base::Result; using ::art::service::ValidateDexPath; @@ -335,7 +333,7 @@ bool PreRebootFlag(const VdexPath& vdex_path) { } bool IsPreRebootStagedFile(std::string_view filename) { - return EndsWith(filename, kPreRebootSuffix); + return filename.ends_with(kPreRebootSuffix); } void TestOnlySetListRootDir(std::string_view root_dir) { gListRootDir = root_dir; } -- cgit v1.2.3-59-g8ed1b