summaryrefslogtreecommitdiff
path: root/read_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'read_helper.h')
-rw-r--r--read_helper.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/read_helper.h b/read_helper.h
index f8396f2..2256ef8 100644
--- a/read_helper.h
+++ b/read_helper.h
@@ -65,14 +65,14 @@ public:
return dst(mt19937);
}
- void readFile() {
+ bool readFile() {
this->population_vector.clear();
auto read_number = 0UL;
FILE *file = fopen(filename, "r");
if (file == nullptr) {
fprintf(stderr, "Unable to open file %s\n", filename);
- exit(1);
+ return false;
}
P_ERR("Reading sample");
@@ -98,6 +98,7 @@ public:
read_number++;
fclose(file);
P_ERR("\r");
+ return true;
}
void split_into(std::vector<key_type> &sample, std::vector<key_type> &p) {