fix navigation issues and warnings

This commit is contained in:
vrd
2023-03-04 19:21:46 +02:00
parent cc7e4c07e6
commit cc7a689dc1
5 changed files with 53 additions and 32 deletions
+11 -8
View File
@@ -4,6 +4,9 @@
#include "tree.hpp"
#include "utils.hpp"
/* macro rather then function to avoid warnings */
#define UNEXPECTED_END() endwin(); cerr << "Unexpected end of file" << std::endl; exit(1)
using std::cerr;
/* using std::string_view; */
using std::string;
@@ -51,12 +54,12 @@ namespace /* internal */
exit(1);
}
void unexpected_end()
{
endwin();
cerr << "Unexpected end of file" << std::endl;
exit(1);
}
/* void unexpected_end() */
/* { */
/* endwin(); */
/* cerr << "Unexpected end of file" << std::endl; */
/* exit(1); */
/* } */
void proceedToNameEnd(char*& it_data)
{
@@ -131,7 +134,7 @@ namespace /* internal */
unexpected_char(*it_data);
}
}
unexpected_end();
UNEXPECTED_END();
}
EventTime processDate(char*& it_data) /* todo validate */
@@ -193,7 +196,7 @@ namespace /* internal */
name.push_back(*it_data);
}
}
unexpected_end();
UNEXPECTED_END();
}
vector<person_id> parseSpouses(char*& it_data)