From 0c5f0e0d2611db3eeea4ee29016372f4cca4b0b4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 9 Sep 2019 21:48:17 -0400 Subject: [PATCH] WindowWin32: Move variable into ifdef Avoids the need to have a separate ifdef path to silence an unused variable warning. --- lib/win/WindowWin32.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/win/WindowWin32.cpp b/lib/win/WindowWin32.cpp index 68fe485..2959b0d 100644 --- a/lib/win/WindowWin32.cpp +++ b/lib/win/WindowWin32.cpp @@ -859,18 +859,17 @@ public: m_hwnd = CreateWindowW(L"BooWindow", title.data(), WS_OVERLAPPEDWINDOW, r.left, r.top, r.right - r.left, r.bottom - r.top, nullptr, nullptr, nullptr, nullptr); - HINSTANCE wndInstance = HINSTANCE(GetWindowLongPtr(m_hwnd, GWLP_HINSTANCE)); m_imc = ImmGetContext(m_hwnd); #if BOO_HAS_VULKAN + HINSTANCE wndInstance = HINSTANCE(GetWindowLongPtr(m_hwnd, GWLP_HINSTANCE)); if (b3dCtx.m_vulkanDxFactory) { m_gfxCtx.reset(new GraphicsContextWin32Vulkan(this, wndInstance, m_hwnd, &g_VulkanContext, b3dCtx)); if (m_gfxCtx->initializeContext(nullptr)) return; } -#else - (void)wndInstance; #endif + IGraphicsContext::EGraphicsAPI api = IGraphicsContext::EGraphicsAPI::D3D11; if (b3dCtx.m_ctxOgl.m_dxFactory) { m_gfxCtx.reset(new GraphicsContextWin32GL(IGraphicsContext::EGraphicsAPI::OpenGL3_3, this, m_hwnd, b3dCtx));