Make StringPiece to be std::string_view alias
Bug: 237583012
Test: build + boot + UTs
Change-Id: I849831f4466d3b9c7ec842b75256e7fcba77a0c0
diff --git a/tools/aapt2/io/ZipArchive.h b/tools/aapt2/io/ZipArchive.h
index 78c9c21..c263aa4 100644
--- a/tools/aapt2/io/ZipArchive.h
+++ b/tools/aapt2/io/ZipArchive.h
@@ -61,10 +61,10 @@
// An IFileCollection that represents a ZIP archive and the entries within it.
class ZipFileCollection : public IFileCollection {
public:
- static std::unique_ptr<ZipFileCollection> Create(const android::StringPiece& path,
+ static std::unique_ptr<ZipFileCollection> Create(android::StringPiece path,
std::string* outError);
- io::IFile* FindFile(const android::StringPiece& path) override;
+ io::IFile* FindFile(android::StringPiece path) override;
std::unique_ptr<IFileCollectionIterator> Iterator() override;
char GetDirSeparator() override;
@@ -76,7 +76,7 @@
ZipArchiveHandle handle_;
std::vector<std::unique_ptr<IFile>> files_;
- std::map<std::string, IFile*> files_by_name_;
+ std::map<std::string, IFile*, std::less<>> files_by_name_;
};
} // namespace io