Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 736ef249 authored by Ryan Prichard's avatar Ryan Prichard
Browse files

aapt2: avoid vector<const T>

A container of const T uses std::allocator<const T>, which was an
undocumented libc++ extension that has been removed.

See https://github.com/llvm/llvm-project/pull/96319.

Bug: 349681543
Test: m libaapt2
Change-Id: Ic712f8c844b05687948162e5d080af3726b322f6
parent 58d9eab5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ void AppendPath(std::string* base, StringPiece part) {
  base->append(part.data(), part.size());
}

std::string BuildPath(std::vector<const StringPiece>&& args) {
std::string BuildPath(const std::vector<StringPiece>& args) {
  if (args.empty()) {
    return "";
  }
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ FileType GetFileType(const std::string& path);
void AppendPath(std::string* base, android::StringPiece part);

// Concatenates the list of paths and separates each part with the directory separator.
std::string BuildPath(std::vector<const android::StringPiece>&& args);
std::string BuildPath(const std::vector<android::StringPiece>& args);

// Makes all the directories in `path`. The last element in the path is interpreted as a directory.
bool mkdirs(const std::string& path);