Rename Array to Vector

Finally get rid of the C style vector, rename the template class to its proper name
This commit is contained in:
topjohnwu
2018-11-08 05:03:59 -05:00
parent b6965105b7
commit 8745c7884e
15 changed files with 52 additions and 56 deletions

View File

@ -56,7 +56,7 @@ cpio_entry::~cpio_entry() {
// Define the way to sort cpio_entry
template<>
int(*Array<cpio_entry*>::_cmp)(cpio_entry*&, cpio_entry*&) = [](auto a, auto b) -> int {
int(*Vector<cpio_entry*>::_cmp)(cpio_entry*&, cpio_entry*&) = [](auto a, auto b) -> int {
if (a == b) return 0;
if (a == nullptr) return 1;
if (b == nullptr) return -1;
@ -148,7 +148,7 @@ void cpio::insert(cpio_entry *e) {
}
}
void cpio::insert(Array<cpio_entry *> &arr) {
void cpio::insert(Vector<cpio_entry *> &arr) {
for (auto &e : arr)
insert(e);
}