mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-04-22 19:10:23 +10:00
The encapsulation of the package manager API has been completed (only a portion of the API has been encapsulated).
This commit is contained in:
8
pkgmgr/raii.h
Normal file
8
pkgmgr/raii.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
struct raii
|
||||
{
|
||||
std::function <void ()> endtask = nullptr;
|
||||
raii (std::function <void ()> pFunc = nullptr): endtask (pFunc) {}
|
||||
~raii () { if (endtask) endtask (); }
|
||||
};
|
||||
Reference in New Issue
Block a user