From 6f6348508a1a5b16cf10ad24f0a3db26cec71da0 Mon Sep 17 00:00:00 2001 From: Mateusz Karbowiak <69864511+mtszkarbowiak@users.noreply.github.com> Date: Sun, 6 Oct 2024 02:53:11 +0200 Subject: [PATCH] `Nullable` implicit cast fix --- .../Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp | 6 +++--- Source/Engine/Platform/Linux/LinuxPlatform.cpp | 10 +++++----- Source/Engine/Platform/Mac/MacPlatform.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp index 9b6d4ba2c..5e11e1a86 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp +++ b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp @@ -1222,11 +1222,11 @@ GPUDevice* GPUDeviceVulkan::Create() return nullptr; } uint32 vendorId = 0; - if (CommandLine::Options.NVIDIA) + if (CommandLine::Options.NVIDIA.IsTrue()) vendorId = GPU_VENDOR_ID_NVIDIA; - else if (CommandLine::Options.AMD) + else if (CommandLine::Options.AMD.IsTrue()) vendorId = GPU_VENDOR_ID_AMD; - else if (CommandLine::Options.Intel) + else if (CommandLine::Options.Intel.IsTrue()) vendorId = GPU_VENDOR_ID_INTEL; if (vendorId != 0) { diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index 2c951effa..681b60c37 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -653,7 +653,7 @@ static int X11_MessageBoxLoop(MessageBoxData* data) DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon) { - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return DialogResult::None; // Setup for simple popup @@ -1369,7 +1369,7 @@ public: DragDropEffect LinuxWindow::DoDragDrop(const StringView& data) { - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return DragDropEffect::None; auto cursorWrong = X11::XCreateFontCursor(xDisplay, 54); auto cursorTransient = X11::XCreateFontCursor(xDisplay, 24); @@ -1673,7 +1673,7 @@ void LinuxClipboard::Clear() void LinuxClipboard::SetText(const StringView& text) { - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return; auto mainWindow = (LinuxWindow*)Engine::MainWindow; if (!mainWindow) @@ -1695,7 +1695,7 @@ void LinuxClipboard::SetFiles(const Array& files) String LinuxClipboard::GetText() { - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return String::Empty; String result; auto mainWindow = (LinuxWindow*)Engine::MainWindow; @@ -2118,7 +2118,7 @@ bool LinuxPlatform::Init() Platform::MemoryClear(CursorsImg, sizeof(CursorsImg)); // Skip setup if running in headless mode (X11 might not be available on servers) - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return false; X11::XInitThreads(); diff --git a/Source/Engine/Platform/Mac/MacPlatform.cpp b/Source/Engine/Platform/Mac/MacPlatform.cpp index 2f054f7a6..84279e194 100644 --- a/Source/Engine/Platform/Mac/MacPlatform.cpp +++ b/Source/Engine/Platform/Mac/MacPlatform.cpp @@ -54,7 +54,7 @@ String ComputerName; DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon) { - if (CommandLine::Options.Headless) + if (CommandLine::Options.Headless.IsTrue()) return DialogResult::None; NSAlert* alert = [[NSAlert alloc] init]; ASSERT(alert);