diff --git a/os/osx/dnd.mm b/os/osx/dnd.mm index f65afae33..f7e6b4a38 100644 --- a/os/osx/dnd.mm +++ b/os/osx/dnd.mm @@ -72,7 +72,7 @@ NSDragOperation as_nsdragoperation(const os::DropOperation op) { - NSDragOperation nsdop; + NSDragOperation nsdop = NSDragOperationNone; if (static_cast(op) & static_cast(os::DropOperation::Copy)) nsdop |= NSDragOperationCopy; @@ -87,7 +87,7 @@ NSDragOperation as_nsdragoperation(const os::DropOperation op) os::DropOperation as_dropoperation(const NSDragOperation nsdop) { - int op = 0; + int op = static_cast(os::DropOperation::None); if (nsdop & NSDragOperationCopy) op |= static_cast(os::DropOperation::Copy); diff --git a/os/win/dnd.cpp b/os/win/dnd.cpp index 4f3b8002f..5af81407e 100644 --- a/os/win/dnd.cpp +++ b/os/win/dnd.cpp @@ -33,7 +33,7 @@ DWORD as_dropeffect(const os::DropOperation op) os::DropOperation as_dropoperation(DWORD pdwEffect) { - int op = 0; + int op = static_cast(os::DropOperation::None); if (pdwEffect & DROPEFFECT_COPY) op |= static_cast(os::DropOperation::Copy);