clean up ref use

This commit is contained in:
2025-01-30 11:56:03 -08:00
parent c3650ba38d
commit 0e708e72f8
2 changed files with 5 additions and 6 deletions

View File

@@ -25,14 +25,14 @@ template <> struct RefTraits<EVP_PKEY_CTX> {
};
template <typename T>
struct FnDeleter {
struct RefDeleter {
auto operator()(T *ptr) const -> void { RefTraits<T>::Free(ptr); }
};
template <typename T>
struct Ref : std::unique_ptr<T, FnDeleter<T>>
struct Ref : std::unique_ptr<T, RefDeleter<T>>
{
using base = std::unique_ptr<T, FnDeleter<T>>;
using base = std::unique_ptr<T, RefDeleter<T>>;
/// Owns nothing
Ref() noexcept = default;