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
|
||||||
handle::current_process (void)
|
handle::current_process (void)
|
||||||
{
|
{
|
||||||
auto process = GetCurrentProcess ();
|
return handle (GetCurrentProcess ());
|
||||||
if (!process)
|
|
||||||
util::win32_error::throw_code ();
|
|
||||||
|
|
||||||
return process;
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
namespace util { namespace win32 {
|
namespace util { namespace win32 {
|
||||||
struct handle {
|
struct handle {
|
||||||
handle ();
|
handle ();
|
||||||
handle (HANDLE&&);
|
explicit handle (HANDLE&&);
|
||||||
handle (handle&&);
|
handle (handle&&);
|
||||||
handle (const handle&) = delete;
|
handle (const handle&) = delete;
|
||||||
~handle ();
|
~handle ();
|
||||||
|
Loading…
Reference in New Issue
Block a user