new auth system + major optimization

This commit is contained in:
Anonymous275
2020-12-16 01:36:35 +02:00
parent 6a29384b5c
commit 19b7f7f579
54 changed files with 16891 additions and 351 deletions

View File

@@ -3,22 +3,18 @@
///
#include "Client.hpp"
#include <memory>
std::string Client::GetName() {
return Name;
}
void Client::SetName(const std::string& name) {
Name = name;
}
void Client::SetDID(const std::string& did) {
DID = did;
}
std::string Client::GetDID() {
return DID;
}
void Client::SetRole(const std::string& role) {
void Client::SetRoles(const std::string& role) {
Role = role;
}
std::string Client::GetRole() {
std::string Client::GetRoles() {
return Role;
}
int Client::GetID() {
@@ -71,17 +67,13 @@ int Client::GetOpenCarID() {
return OpenID;
}
void Client::AddNewCar(int ident, const std::string& Data) {
VehicleData.insert(std::unique_ptr<VData>(new VData { ident, Data }));
VehicleData.insert(std::make_unique<VData>(VData { ident, Data }));
}
std::set<std::unique_ptr<VData>>& Client::GetAllCars() {
return VehicleData;
}
const std::set<std::unique_ptr<VData>>& Client::GetAllCars() const {
return VehicleData;
}
std::string Client::GetCarData(int ident) {
for (auto& v : VehicleData) {
if (v != nullptr && v->ID == ident) {