ViewGuard: Add a copy-ctor

This commit is contained in:
Sergio Martins
2022-04-05 21:25:20 +01:00
parent 607ec01feb
commit 3e4d172765
2 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ ViewGuard::ViewGuard(View *view)
setView(view);
}
ViewGuard::ViewGuard(const ViewGuard &other)
{
setView(other.view());
}
ViewGuard::~ViewGuard()
{
clear();

View File

@@ -25,6 +25,7 @@ class DOCKS_EXPORT ViewGuard
{
public:
ViewGuard(View *v);
ViewGuard(const ViewGuard &);
~ViewGuard();
operator bool() const;