mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-28 01:05:58 -04:00
Declare all folder names in a single source file (#2039)
This commit is contained in:
parent
d9bbd1b9ff
commit
d5c8525afc
56 changed files with 224 additions and 105 deletions
|
@ -23,10 +23,11 @@
|
|||
|
||||
#include "database.hpp"
|
||||
#include "file.hpp"
|
||||
#include "file_path.hpp"
|
||||
#include <cstring>
|
||||
|
||||
int database::retrieve_mid_record(MidDBRecord* record, std::string search_term) {
|
||||
file_path = "AIS/mids.db";
|
||||
file_path = ais_dir / u"mids.db";
|
||||
index_item_length = 4;
|
||||
record_length = 32;
|
||||
|
||||
|
@ -36,7 +37,7 @@ int database::retrieve_mid_record(MidDBRecord* record, std::string search_term)
|
|||
}
|
||||
|
||||
int database::retrieve_airline_record(AirlinesDBRecord* record, std::string search_term) {
|
||||
file_path = "ADSB/airlines.db";
|
||||
file_path = adsb_dir / u"airlines.db";
|
||||
index_item_length = 4;
|
||||
record_length = 64;
|
||||
|
||||
|
@ -46,7 +47,7 @@ int database::retrieve_airline_record(AirlinesDBRecord* record, std::string sear
|
|||
}
|
||||
|
||||
int database::retrieve_aircraft_record(AircraftDBRecord* record, std::string search_term) {
|
||||
file_path = "ADSB/icao24.db";
|
||||
file_path = adsb_dir / u"icao24.db";
|
||||
index_item_length = 7;
|
||||
record_length = 146;
|
||||
|
||||
|
@ -55,7 +56,7 @@ int database::retrieve_aircraft_record(AircraftDBRecord* record, std::string sea
|
|||
return (result);
|
||||
}
|
||||
|
||||
int database::retrieve_record(std::string file_path, int index_item_length, int record_length, void* record, std::string search_term) {
|
||||
int database::retrieve_record(std::filesystem::path file_path, int index_item_length, int record_length, void* record, std::string search_term) {
|
||||
if (search_term.empty())
|
||||
return DATABASE_RECORD_NOT_FOUND;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue