Use explicit nullptr instead of aggregate init

Makes it a bit more obvious that HCURSOR is a pointer.
This commit is contained in:
Robbert van der Helm
2022-11-14 15:16:34 +01:00
parent 43d552c82d
commit 561a75b761
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ constexpr uint32_t xembed_focus_first = 1;
*/
// static const HCURSOR arrow_cursor = LoadCursor(nullptr, IDC_ARROW);
inline HCURSOR arrow_cursor() {
static HCURSOR cursor{};
static HCURSOR cursor = nullptr;
if (!cursor) {
cursor = LoadCursor(nullptr, IDC_ARROW);
}
+2 -2
View File
@@ -59,7 +59,7 @@ constexpr char mime_text_plain_name[] = "text/plain";
// Revert this once Wine 7.21 is old enough that noone uses it anymore.
// static const HCURSOR dnd_accepted_cursor = LoadCursor(nullptr, IDC_HAND);
inline HCURSOR dnd_accepted_cursor() {
static HCURSOR cursor{};
static HCURSOR cursor = nullptr;
if (!cursor) {
cursor = LoadCursor(nullptr, IDC_HAND);
}
@@ -68,7 +68,7 @@ inline HCURSOR dnd_accepted_cursor() {
}
// static const HCURSOR dnd_denied_cursor = LoadCursor(nullptr, IDC_NO);
inline HCURSOR dnd_denied_cursor() {
static HCURSOR cursor{};
static HCURSOR cursor = nullptr;
if (!cursor) {
cursor = LoadCursor(nullptr, IDC_NO);
}