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

Commit 13a45c01 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

libziparchive: remove now-unused StartIteration overload.

Bug: http://b/129068177
Test: treehugger
Change-Id: If494c3031aee2bd3e72eda57de4c334f11f5a5df
parent 9426110d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -180,9 +180,6 @@ int32_t FindEntry(const ZipArchiveHandle archive, const std::string_view entryNa
int32_t StartIteration(ZipArchiveHandle archive, void** cookie_ptr,
                       const std::string_view optional_prefix = "",
                       const std::string_view optional_suffix = "");
// TODO: remove this.
int32_t StartIteration(ZipArchiveHandle archive, void** cookie_ptr,
                       const ZipString* optional_prefix, const ZipString* optional_suffix);

/*
 * Advance to the next element in the zipfile in iteration order.
+0 −16
Original line number Diff line number Diff line
@@ -726,22 +726,6 @@ int32_t StartIteration(ZipArchiveHandle archive, void** cookie_ptr,
  return 0;
}

// TODO: remove this.
int32_t StartIteration(ZipArchiveHandle archive, void** cookie_ptr,
                       const ZipString* optional_prefix, const ZipString* optional_suffix) {
  std::string prefix;
  if (optional_prefix) {
    prefix = std::string(reinterpret_cast<const char*>(optional_prefix->name),
                         optional_prefix->name_length);
  }
  std::string suffix;
  if (optional_suffix) {
    suffix = std::string(reinterpret_cast<const char*>(optional_suffix->name),
                         optional_suffix->name_length);
  }
  return StartIteration(archive, cookie_ptr, prefix.c_str(), suffix.c_str());
}

void EndIteration(void* cookie) {
  delete reinterpret_cast<IterationHandle*>(cookie);
}