From 4de85eb26e63011eff3c0c7b00e0b8eb1cfa2d67 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 1bc0c32e081..fa286c709ef 100644 --- a/src/common/classes/auto.h +++ b/src/common/classes/auto.h @@ -191,25 +191,11 @@ class AutoPtr 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