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

@ -24,7 +24,7 @@
#include "flags.h"
static char buf[PATH_MAX], buf2[PATH_MAX];
static Array<CharArray> module_list;
static Vector<CharArray> module_list;
static int bind_mount(const char *from, const char *to);
@ -56,7 +56,7 @@ private:
uint8_t type;
uint8_t status;
node_entry *parent;
Array<node_entry *> children;
Vector<node_entry *> children;
node_entry(const char *, const char *, uint8_t type);
bool is_root();
@ -478,8 +478,8 @@ static void install_apk(const char *apk) {
static bool check_data() {
bool mnt = false;
bool data = false;
Array<CharArray> mounts;
file_to_array("/proc/mounts", mounts);
Vector<CharArray> mounts;
file_to_vector("/proc/mounts", mounts);
for (auto &line : mounts) {
if (line.contains(" /data ") && !line.contains("tmpfs"))
mnt = true;
@ -705,8 +705,8 @@ void startup() {
xmkdir(BLOCKDIR, 0755);
LOGI("* Mounting mirrors");
Array<CharArray> mounts;
file_to_array("/proc/mounts", mounts);
Vector<CharArray> mounts;
file_to_vector("/proc/mounts", mounts);
bool system_as_root = false;
for (auto &line : mounts) {
if (line.contains(" /system_root ")) {

View File

@ -19,7 +19,7 @@
#include "flags.h"
bool log_daemon_started = false;
static Array<const char *> log_cmd, clear_cmd;
static Vector<const char *> log_cmd, clear_cmd;
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
enum {