mirror of
https://github.com/BeneficialCode/WinArk.git
synced 2026-10-17 04:40:35 +08:00
c425897cbe
Add the APC region.
14 lines
198 B
C++
14 lines
198 B
C++
#pragma once
|
|
|
|
template<typename TRegion>
|
|
struct AutoEnter {
|
|
AutoEnter(TRegion& region) :_region(region) {
|
|
_region.Enter();
|
|
}
|
|
|
|
~AutoEnter() {
|
|
_region.Leave();
|
|
}
|
|
private:
|
|
TRegion& _region;
|
|
}; |