Make StringPiece to be std::string_view alias
Bug: 237583012
Test: build + boot + UTs
Change-Id: I849831f4466d3b9c7ec842b75256e7fcba77a0c0
diff --git a/tools/aapt2/xml/XmlPullParser.h b/tools/aapt2/xml/XmlPullParser.h
index ab34772..fe4cd01 100644
--- a/tools/aapt2/xml/XmlPullParser.h
+++ b/tools/aapt2/xml/XmlPullParser.h
@@ -120,8 +120,7 @@
* If xmlns:app="http://schemas.android.com/apk/res-auto", then
* 'package' will be set to 'defaultPackage'.
*/
- std::optional<ExtractedPackage> TransformPackageAlias(
- const android::StringPiece& alias) const override;
+ std::optional<ExtractedPackage> TransformPackageAlias(android::StringPiece alias) const override;
struct PackageDecl {
std::string prefix;
@@ -194,7 +193,7 @@
* Finds the attribute in the current element within the global namespace.
*/
std::optional<android::StringPiece> FindAttribute(const XmlPullParser* parser,
- const android::StringPiece& name);
+ android::StringPiece name);
/**
* Finds the attribute in the current element within the global namespace. The
@@ -202,7 +201,7 @@
* must not be the empty string.
*/
std::optional<android::StringPiece> FindNonEmptyAttribute(const XmlPullParser* parser,
- const android::StringPiece& name);
+ android::StringPiece name);
//
// Implementation