Convert most std::list to std::vector (#2247)

This tends to be more efficient due to fewer allocations.  Also fix std::sort
comparator which should be strictly less than.
This commit is contained in:
Andrew Gaul
2023-08-05 10:05:32 +09:00
committed by GitHub
parent b14758baff
commit 13ad53eef7
13 changed files with 30 additions and 19 deletions

View File

@ -22,8 +22,9 @@
#include <cstdlib>
#include <iostream>
#include <climits>
#include <string>
#include <list>
#include <string>
#include <vector>
#include <unistd.h>
#include <sys/types.h>
@ -41,8 +42,8 @@ struct write_block_part
off_t size;
};
typedef std::list<write_block_part> wbpart_list_t;
typedef std::list<std::string> strlist_t;
typedef std::vector<write_block_part> wbpart_list_t;
typedef std::list<std::string> strlist_t;
//---------------------------------------------------------
// Const