@@ -79,6 +79,12 @@ namespace SharedUtil::Details
7979 #undef GetModuleBaseNameW
8080 #endif
8181
82+ struct HKeyDeleter
83+ {
84+ void operator ()(HKEY hk) const noexcept { RegCloseKey (hk); }
85+ };
86+ using UniqueHKey = std::unique_ptr<std::remove_pointer_t <HKEY>, HKeyDeleter>;
87+
8288namespace SharedUtil ::Details
8389{
8490 class UniqueHGlobal
@@ -116,7 +122,7 @@ namespace SharedUtil::Details
116122 private:
117123 HGLOBAL m_handle = nullptr ;
118124 };
119- }
125+ } // namespace SharedUtil::Details
120126#else
121127 #include < wctype.h>
122128 #ifndef _GNU_SOURCE
@@ -153,12 +159,6 @@ struct SReportLine
153159};
154160CDuplicateLineFilter<SReportLine> ms_ReportLineFilter;
155161
156- struct HKeyDeleter
157- {
158- void operator ()(HKEY hk) const noexcept { RegCloseKey (hk); }
159- };
160- using UniqueHKey = std::unique_ptr<std::remove_pointer_t <HKEY>, HKeyDeleter>;
161-
162162#ifdef MTA_CLIENT
163163
164164#define PRODUCT_REGISTRY_PATH " Software\\ Multi Theft Auto: San Andreas All" // HKLM
@@ -1439,7 +1439,7 @@ void SharedUtil::AddExceptionReportLog(uint uiId, const char* szExceptionName, c
14391439 " %u: %04hu-%02hu-%02hu %02hu:%02hu:%02hu - Caught %.*s exception: %.*s\n " ,
14401440 uiId, s.wYear , s.wMonth , s.wDay , s.wHour , s.wMinute , s.wSecond ,
14411441 (int )MAX_EXCEPTION_NAME_SIZE, szExceptionName ? szExceptionName : " Unknown" ,
1442- (int )MAX_EXCEPTION_TEXT_SIZE, szExceptionText ? szExceptionText : " " );
1442+ (int )MAX_EXCEPTION_TEXT_SIZE, szExceptionText ? szExceptionText : " " );
14431443
14441444 OutputDebugString (" [ReportLog] " );
14451445 OutputDebugString (&szOutput[0 ]);
0 commit comments