summaryrefslogtreecommitdiff
path: root/libnativeloader/library_namespaces.cpp
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-06-12 09:30:37 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-06-14 10:14:50 +0000
commit2b4eb676348f122ab0a21e19d7a3c57bd9898c6c (patch)
tree281ceaa54365c8c38ca94ea484c831aeb1951bf8 /libnativeloader/library_namespaces.cpp
parent9132d9056cc1d4eb342d1a2b0315fc1f054ca2f8 (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 'libnativeloader/library_namespaces.cpp')
-rw-r--r--libnativeloader/library_namespaces.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp
index 7b18b15dd0..e0f3d6af8c 100644
--- a/libnativeloader/library_namespaces.cpp
+++ b/libnativeloader/library_namespaces.cpp
@@ -483,7 +483,7 @@ std::optional<std::string> FindApexNamespaceName(const std::string& location) {
// /apex/modulename/...
//
// And we extract from it 'modulename', and then apply mangling rule to get namespace name for it.
- if (android::base::StartsWith(location, kApexPath)) {
+ if (location.starts_with(kApexPath)) {
size_t start_index = strlen(kApexPath);
size_t slash_index = location.find_first_of('/', start_index);
LOG_ALWAYS_FATAL_IF((slash_index == std::string::npos),