win32/handle: make HANDLE constructor explicit
This commit is contained in:
parent
eb05746a21
commit
41a8efa200
@ -70,9 +70,5 @@ handle::reset (HANDLE rhs)
|
||||
handle
|
||||
handle::current_process (void)
|
||||
{
|
||||
auto process = GetCurrentProcess ();
|
||||
if (!process)
|
||||
util::win32_error::throw_code ();
|
||||
|
||||
return process;
|
||||
return handle (GetCurrentProcess ());
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace util { namespace win32 {
|
||||
struct handle {
|
||||
handle ();
|
||||
handle (HANDLE&&);
|
||||
explicit handle (HANDLE&&);
|
||||
handle (handle&&);
|
||||
handle (const handle&) = delete;
|
||||
~handle ();
|
||||
|
Loading…
Reference in New Issue
Block a user