diff options
author | Marcin Siodelski <marcin@isc.org> | 2022-11-16 11:18:49 +0100 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2022-11-21 08:52:03 +0100 |
commit | 3bfcf6b85a5f9f5a376162f324fdac1910bc4782 (patch) | |
tree | f2935acf61c6b50aa6c0c901ae968ebc716d1fb6 /src/lib/dhcpsrv/allocator.h | |
parent | [#2348] Code alignment fix (diff) | |
download | kea-3bfcf6b85a5f9f5a376162f324fdac1910bc4782.tar.xz kea-3bfcf6b85a5f9f5a376162f324fdac1910bc4782.zip |
[#2348] Addressed review comments
- Remove unused AllocEngine ctor parameter
- Simplify locks
- Use default keyword instead of an empty implementation in dtors
- Fix typos
Diffstat (limited to 'src/lib/dhcpsrv/allocator.h')
-rw-r--r-- | src/lib/dhcpsrv/allocator.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/dhcpsrv/allocator.h b/src/lib/dhcpsrv/allocator.h index 77a4d58595..7a902bb5de 100644 --- a/src/lib/dhcpsrv/allocator.h +++ b/src/lib/dhcpsrv/allocator.h @@ -68,8 +68,7 @@ public: } /// @brief Virtual destructor - virtual ~Allocator() { - } + virtual ~Allocator() = default; /// @brief Picks an address or a delegated prefix. /// @@ -98,12 +97,8 @@ public: pickAddress(const ClientClasses& client_classes, const DuidPtr& duid, const asiolink::IOAddress& hint) { - if (util::MultiThreadingMgr::instance().getMode()) { - std::lock_guard<std::mutex> lock(mutex_); - return pickAddressInternal(client_classes, duid, hint); - } else { - return pickAddressInternal(client_classes, duid, hint); - } + util::MultiThreadingLock lock(mutex_); + return (pickAddressInternal(client_classes, duid, hint)); } private: |