Skip to content

Commit d0d38bd

Browse files
committed
Addendum to 6e19a73
1 parent 5f82d6b commit d0d38bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Shared/sdk/SharedUtil.Misc.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ struct SReportLine
9494
};
9595
CDuplicateLineFilter<SReportLine> ms_ReportLineFilter;
9696

97+
struct HKeyDeleter
98+
{
99+
void operator()(HKEY hk) const noexcept { RegCloseKey(hk); }
100+
};
101+
using UniqueHKey = std::unique_ptr<std::remove_pointer_t<HKEY>, HKeyDeleter>;
102+
97103
#ifdef MTA_CLIENT
98104

99105
#define PRODUCT_REGISTRY_PATH "Software\\Multi Theft Auto: San Andreas All" // HKLM

0 commit comments

Comments
 (0)