diff options
author | 2024-06-12 09:30:37 +0000 | |
---|---|---|
committer | 2024-06-14 10:14:50 +0000 | |
commit | 2b4eb676348f122ab0a21e19d7a3c57bd9898c6c (patch) | |
tree | 281ceaa54365c8c38ca94ea484c831aeb1951bf8 /dexopt_chroot_setup | |
parent | 9132d9056cc1d4eb342d1a2b0315fc1f054ca2f8 (diff) |
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
Diffstat (limited to 'dexopt_chroot_setup')
-rw-r--r-- | dexopt_chroot_setup/dexopt_chroot_setup.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dexopt_chroot_setup/dexopt_chroot_setup.cc b/dexopt_chroot_setup/dexopt_chroot_setup.cc index d98f883df9..937cd3028b 100644 --- a/dexopt_chroot_setup/dexopt_chroot_setup.cc +++ b/dexopt_chroot_setup/dexopt_chroot_setup.cc @@ -58,7 +58,6 @@ namespace dexopt_chroot_setup { namespace { using ::android::base::ConsumePrefix; -using ::android::base::EndsWith; using ::android::base::Error; using ::android::base::Join; using ::android::base::NoDestructor; @@ -210,7 +209,7 @@ Result<void> BindMount(const std::string& source, const std::string& target) { } Result<void> BindMountRecursive(const std::string& source, const std::string& target) { - CHECK(!EndsWith(source, '/')); + CHECK(!source.ends_with('/')); OR_RETURN(BindMount(source, target)); // Mount and make slave one by one. Do not use MS_REC because we don't want to mount a child if @@ -222,7 +221,7 @@ Result<void> BindMountRecursive(const std::string& source, const std::string& ta // The list is in mount order. std::vector<FstabEntry> entries = OR_RETURN(GetProcMountsDescendantsOfPath(source)); for (const FstabEntry& entry : entries) { - CHECK(!EndsWith(entry.mount_point, '/')); + CHECK(!entry.mount_point.ends_with('/')); std::string_view sub_dir = entry.mount_point; CHECK(ConsumePrefix(&sub_dir, source)); if (sub_dir.empty()) { |