8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 15:23:03 +01:00

Refactor AutoDispose and AutoRelease

Removed redundant class definitions and replaced them with type aliases.
This commit is contained in:
Artyom Ivanov 2024-12-10 11:25:35 +03:00 committed by Adriano dos Santos Fernandes
parent a8c5b9fa96
commit 00581850a4

View File

@ -191,25 +191,11 @@ private:
void operator=(AutoPtr&);
};
template <typename T>
using AutoDispose = AutoPtr<T, SimpleDispose>;
template <typename Where>
class AutoDispose : public AutoPtr<Where, SimpleDispose>
{
public:
AutoDispose(Where* v = nullptr)
: AutoPtr<Where, SimpleDispose>(v)
{ }
};
template <typename Where>
class AutoRelease : public AutoPtr<Where, SimpleRelease>
{
public:
AutoRelease(Where* v = nullptr)
: AutoPtr<Where, SimpleRelease>(v)
{ }
};
template <typename T>
using AutoRelease = AutoPtr<T, SimpleRelease>;
template <typename T>