@@ -79,6 +79,12 @@ namespace SharedUtil::Details
79
79
#undef GetModuleBaseNameW
80
80
#endif
81
81
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
+
82
88
namespace SharedUtil ::Details
83
89
{
84
90
class UniqueHGlobal
@@ -116,7 +122,7 @@ namespace SharedUtil::Details
116
122
private:
117
123
HGLOBAL m_handle = nullptr ;
118
124
};
119
- }
125
+ } // namespace SharedUtil::Details
120
126
#else
121
127
#include < wctype.h>
122
128
#ifndef _GNU_SOURCE
@@ -153,12 +159,6 @@ struct SReportLine
153
159
};
154
160
CDuplicateLineFilter<SReportLine> ms_ReportLineFilter;
155
161
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
-
162
162
#ifdef MTA_CLIENT
163
163
164
164
#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
1439
1439
" %u: %04hu-%02hu-%02hu %02hu:%02hu:%02hu - Caught %.*s exception: %.*s\n " ,
1440
1440
uiId, s.wYear , s.wMonth , s.wDay , s.wHour , s.wMinute , s.wSecond ,
1441
1441
(int )MAX_EXCEPTION_NAME_SIZE, szExceptionName ? szExceptionName : " Unknown" ,
1442
- (int )MAX_EXCEPTION_TEXT_SIZE, szExceptionText ? szExceptionText : " " );
1442
+ (int )MAX_EXCEPTION_TEXT_SIZE, szExceptionText ? szExceptionText : " " );
1443
1443
1444
1444
OutputDebugString (" [ReportLog] " );
1445
1445
OutputDebugString (&szOutput[0 ]);
0 commit comments