mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
[Analyzers][CPP] Turn on warning 4459 (#22234)
* Turn on warning 4459 * minor format
This commit is contained in:
parent
a98b12a2fb
commit
4a087a816e
@ -42,7 +42,7 @@
|
||||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>26800;28251;6387;4458;4505;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>26800;28251;6387;4458;4505;4702;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
||||
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
||||
<ConformanceMode>false</ConformanceMode>
|
||||
|
@ -646,7 +646,7 @@ void D2DOverlayWindow::hide_thumbnail()
|
||||
|
||||
void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc)
|
||||
{
|
||||
if (!hidden && !instance->overlay_visible())
|
||||
if (!hidden && !overlay_window_instance->overlay_visible())
|
||||
{
|
||||
hide();
|
||||
return;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <common/hooks/LowlevelKeyboardEvent.h>
|
||||
|
||||
// TODO: refactor singleton
|
||||
OverlayWindow* instance = nullptr;
|
||||
OverlayWindow* overlay_window_instance = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -136,13 +136,13 @@ namespace
|
||||
if (event.lParam->vkCode == VK_ESCAPE)
|
||||
{
|
||||
Logger::trace(L"ESC key was pressed");
|
||||
instance->CloseWindow(HideWindowType::ESC_PRESSED);
|
||||
overlay_window_instance->CloseWindow(HideWindowType::ESC_PRESSED);
|
||||
}
|
||||
|
||||
if (wasWinPressed && !isKeyDown(event) && isWin(event.lParam->vkCode))
|
||||
{
|
||||
Logger::trace(L"Win key was released");
|
||||
instance->CloseWindow(HideWindowType::WIN_RELEASED);
|
||||
overlay_window_instance->CloseWindow(HideWindowType::WIN_RELEASED);
|
||||
}
|
||||
|
||||
if (isKeyDown(event) && isWin(event.lParam->vkCode))
|
||||
@ -153,7 +153,7 @@ namespace
|
||||
if (onlyWinPressed() && isKeyDown(event) && !isWin(event.lParam->vkCode))
|
||||
{
|
||||
Logger::trace(L"Shortcut with win key was pressed");
|
||||
instance->CloseWindow(HideWindowType::WIN_SHORTCUT_PRESSED);
|
||||
overlay_window_instance->CloseWindow(HideWindowType::WIN_SHORTCUT_PRESSED);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ namespace
|
||||
|
||||
OverlayWindow::OverlayWindow(HWND activeWindow)
|
||||
{
|
||||
instance = this;
|
||||
overlay_window_instance = this;
|
||||
this->activeWindow = activeWindow;
|
||||
app_name = GET_RESOURCE_STRING(IDS_SHORTCUT_GUIDE);
|
||||
|
||||
@ -252,7 +252,7 @@ void OverlayWindow::CloseWindow(HideWindowType type, int mainThreadId)
|
||||
bool OverlayWindow::IsDisabled()
|
||||
{
|
||||
WCHAR exePath[MAX_PATH] = L"";
|
||||
instance->get_exe_path(activeWindow, exePath);
|
||||
overlay_window_instance->get_exe_path(activeWindow, exePath);
|
||||
if (wcslen(exePath) > 0)
|
||||
{
|
||||
return is_disabled_app(exePath);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "Generated Files/resource.h"
|
||||
|
||||
// We support only one instance of the overlay
|
||||
extern class OverlayWindow* instance;
|
||||
extern class OverlayWindow* overlay_window_instance;
|
||||
|
||||
class TargetState;
|
||||
|
||||
|
@ -33,7 +33,7 @@ void TargetState::toggle_force_shown()
|
||||
if (state != ForceShown)
|
||||
{
|
||||
state = ForceShown;
|
||||
instance->on_held();
|
||||
overlay_window_instance->on_held();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user