Optimize Auto Databank code
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#include <chrono>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "databank.h"
|
||||
|
||||
@@ -9,31 +7,21 @@ namespace Databank
|
||||
{
|
||||
struct PvEntry
|
||||
{
|
||||
int id = -1;
|
||||
int unk1 = 1;
|
||||
int unk2 = 0;
|
||||
std::string advStart, advEnd, start, end;
|
||||
|
||||
bool operator<(const PvEntry& other) const
|
||||
{
|
||||
return id < other.id;
|
||||
}
|
||||
};
|
||||
|
||||
class PvList
|
||||
{
|
||||
protected:
|
||||
std::set<PvEntry> entries;
|
||||
std::map<int, PvEntry> entries;
|
||||
|
||||
public:
|
||||
std::string finalString = std::string();
|
||||
//std::string checksum = std::string();
|
||||
|
||||
bool readFromStr(std::string& str);
|
||||
bool readFromFile(const std::string& filename);
|
||||
bool finalize();
|
||||
void copyCstrData(char* dst);
|
||||
void addEntry(PvEntry& entry);
|
||||
void addEntry(int id, PvEntry& entry);
|
||||
void generateMissingEntries();
|
||||
std::string finalize();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user