Declare handle::detach()
It's trivial and used at the point from which no C++ exceptions are expected, as the handle is no longer a subject to RAAI. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
f33010e6b6
commit
e432882d3b
@ -687,7 +687,7 @@ static _Success_(return != 0) int SecureMultiByteToWideChar(_In_ UINT CodePage,
|
||||
template<class _Traits, class _Ax>
|
||||
static DWORD FormatMessageA(_In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Inout_ std::basic_string<char, _Traits, _Ax> &str, _In_opt_ va_list *Arguments)
|
||||
{
|
||||
LPSTR lpBuffer;
|
||||
LPSTR lpBuffer;
|
||||
DWORD dwResult = FormatMessageA(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, lpSource, dwMessageId, dwLanguageId, reinterpret_cast<LPSTR>(&lpBuffer), 0, Arguments);
|
||||
if (dwResult) {
|
||||
str.assign(lpBuffer, dwResult);
|
||||
@ -1098,7 +1098,7 @@ namespace winstd
|
||||
///
|
||||
/// \return Object handle
|
||||
///
|
||||
handle_type detach()
|
||||
handle_type detach() noexcept
|
||||
{
|
||||
handle_type h = m_h;
|
||||
m_h = invalid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user