Reducing memory footprint.

This commit is contained in:
stephb9959
2022-02-05 09:32:35 -08:00
parent 19c8773768
commit 262011e7bf
2 changed files with 17 additions and 1 deletions

View File

@@ -20,9 +20,10 @@ namespace OpenWifi {
void AddSerialNumber(const std::string &SerialNumber);
void DeleteSerialNumber(const std::string &SerialNumber);
void FindNumbers(const std::string &SerialNumber, uint HowMany, std::vector<uint64_t> &A);
inline bool NumberExists(const std::string &SerialNumber) {
/* inline bool NumberExists(const std::string &SerialNumber) {
return NumberExists(Utils::SerialNumberToInt(SerialNumber));
}
*/
inline bool NumberExists(uint64_t SerialNumber) {
std::lock_guard G(Mutex_);
return std::find(SNs_.begin(),SNs_.end(),SerialNumber)!=SNs_.end();