refactor: change memory management and fix related code
- Switched shared_ptr to raw pointers - Added cleanup logic in DataStore - Fixed Factory object creation - Updated function signatures to match changes - Small refactors and formatting fixes
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* Author: Trenser
|
||||
* Created: 01-Apr-2026
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include<string>
|
||||
#include<map>
|
||||
@@ -21,8 +20,8 @@ namespace util
|
||||
bool isPhoneNumberValid(const std::string&);
|
||||
bool isEmailValid(const std::string&);
|
||||
bool isPasswordValid(const std::string&);
|
||||
bool hasActiveEmployeeOfType(Enums::EmployeeType, const std::map<std::string, std::shared_ptr<Employee>>&);
|
||||
bool isEmailDuplicate(const std::string&, const std::map<std::string, std::shared_ptr<Employee>>&);
|
||||
bool isPhoneDuplicate(const std::string&, const std::map<std::string, std::shared_ptr<Employee>>&);
|
||||
bool isPhoneDuplicate(const std::string&, const std::vector<std::shared_ptr<const Employee>>&);
|
||||
bool hasActiveEmployeeOfType(Enums::EmployeeType, const std::map<std::string, Employee*>&);
|
||||
bool isEmailDuplicate(const std::string&, const std::map<std::string, Employee*>&);
|
||||
bool isPhoneDuplicate(const std::string&, const std::map<std::string, Employee*>&);
|
||||
bool isPhoneDuplicate(const std::string&, const std::vector<const Employee*>&);
|
||||
}
|
||||
Reference in New Issue
Block a user