From 00581850a44f23e48fcb917f51f92b96eac19464 Mon Sep 17 00:00:00 2001 From: Artyom Ivanov Date: Tue, 10 Dec 2024 11:25:35 +0300 Subject: [PATCH] Refactor AutoDispose and AutoRelease Removed redundant class definitions and replaced them with type aliases. --- src/common/classes/auto.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/common/classes/auto.h b/src/common/classes/auto.h index 1bc0c32e08..fa286c709e 100644 --- a/src/common/classes/auto.h +++ b/src/common/classes/auto.h @@ -191,25 +191,11 @@ private: void operator=(AutoPtr&); }; +template +using AutoDispose = AutoPtr; -template -class AutoDispose : public AutoPtr -{ -public: - AutoDispose(Where* v = nullptr) - : AutoPtr(v) - { } -}; - - -template -class AutoRelease : public AutoPtr -{ -public: - AutoRelease(Where* v = nullptr) - : AutoPtr(v) - { } -}; +template +using AutoRelease = AutoPtr; template