Logbokk fligth type
This commit is contained in:
1 parent
a50d89f4aa
commit
52da1262b0
5 files changed
+13
-87
No files matched your search
@@ -35,6 +35,7 @@ namespace file
|
||||
inline void readVersion1(std::ifstream &in)
|
||||
{
|
||||
std::string date = readString(in, 10);
|
||||
std::string flightType = readString(in, 1);
|
||||
std::string flightNumber = readString(in, 4);
|
||||
std::string aircraftType = readString(in, 4);
|
||||
std::string aircraftRegistration = readString(in, 6);
|
||||
@@ -65,6 +66,7 @@ namespace file
|
||||
std::uint8_t flags = read<std::uint8_t>(in);
|
||||
|
||||
this->addEntry(date,
|
||||
flightType,
|
||||
flightNumber,
|
||||
aircraftType,
|
||||
aircraftRegistration,
|
||||
@@ -99,7 +101,7 @@ namespace file
|
||||
{
|
||||
std::ifstream in(BASE_DIRECTORY LOGBOOK, std::ifstream::binary);
|
||||
|
||||
std::string ident = readString(in, 5);
|
||||
std::string ident = readString(in, 4);
|
||||
if (ident.compare(LOGBOOK_HEADER) != 0) {
|
||||
throw std::invalid_argument("Wrong file");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user