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 --- libnativeloader/library_namespaces.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libnativeloader/library_namespaces.cpp') 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 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), -- cgit v1.2.3-59-g8ed1b