optimized variables

This commit is contained in:
Sebastian Brosch 2024-11-01 21:55:53 +01:00
parent 36502ffbaf
commit b569180ebd
Signed by: sebastianbrosch
GPG Key ID: 66E3143B54A6CF10

View File

@ -32,12 +32,13 @@ void clear(std::vector<phonebook_entry*> &phonebook) {
std::vector<phonebook_entry*> getPhonebookFromFile(std::string filename) {
std::ifstream file(filename);
std::string line;
int rownumber = 0;
std::vector<phonebook_entry*> phonebook;
phonebook_entry* entry;
if (file.is_open()) {
int rownumber = 0;
std::string line;
while (file >> line) {
switch (rownumber % 3) {
case 0: