Skip to content

Commit bd4d0f7

Browse files
authored
Addendum to 6e19a73
1 parent 9d98bf8 commit bd4d0f7

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
@@ -99,6 +99,12 @@ struct SReportLine
9999
};
100100
CDuplicateLineFilter<SReportLine> ms_ReportLineFilter;
101101

102+
struct HKeyDeleter
103+
{
104+
void operator()(HKEY hk) const noexcept { RegCloseKey(hk); }
105+
};
106+
using UniqueHKey = std::unique_ptr<std::remove_pointer_t<HKEY>, HKeyDeleter>;
107+
102108
#ifdef MTA_CLIENT
103109

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

0 commit comments

Comments
 (0)