Commit 5eb6dfe 1 parent 734515a commit 5eb6dfe Copy full SHA for 5eb6dfe
File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 5
5
#include " third_party/zlib/google/zip_writer.h"
6
6
7
7
#include < algorithm>
8
+ #include < tuple>
8
9
9
10
#include " base/files/file.h"
10
11
#include " base/logging.h"
@@ -193,8 +194,8 @@ bool ZipWriter::AddMixedEntries(Paths paths) {
193
194
while (!paths.empty ()) {
194
195
// Work with chunks of 50 paths at most.
195
196
const size_t n = std::min<size_t >(paths.size (), 50 );
196
- const Paths relative_paths = paths. subspan ( 0 , n) ;
197
- paths = paths. subspan (n , paths. size () - n);
197
+ Paths relative_paths;
198
+ std::tie (relative_paths , paths) = paths. split_at ( n);
198
199
199
200
files.clear ();
200
201
if (!file_accessor_->Open (relative_paths, &files) || files.size () != n)
@@ -233,8 +234,8 @@ bool ZipWriter::AddFileEntries(Paths paths) {
233
234
while (!paths.empty ()) {
234
235
// Work with chunks of 50 paths at most.
235
236
const size_t n = std::min<size_t >(paths.size (), 50 );
236
- const Paths relative_paths = paths. subspan ( 0 , n) ;
237
- paths = paths. subspan (n , paths. size () - n);
237
+ Paths relative_paths;
238
+ std::tie (relative_paths , paths) = paths. split_at ( n);
238
239
239
240
DCHECK_EQ (relative_paths.size (), n);
240
241
You can’t perform that action at this time.
0 commit comments