mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[Analyzers][CPP] Turn on warning 4702 (#22285)
* Turn on 4702 unreachable code * fix warnings that didnt show locally * add comments about disable warnings * improve comments * changes from comments * fix from PR comments
This commit is contained in:
@@ -36,8 +36,9 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-app-zone-history.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\app-zone-history.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
@@ -36,7 +36,7 @@ class AppliedLayouts
|
||||
{
|
||||
public:
|
||||
using TAppliedLayoutsMap = std::unordered_map<FancyZonesDataTypes::WorkAreaId, LayoutData>;
|
||||
|
||||
|
||||
static AppliedLayouts& instance();
|
||||
|
||||
inline static std::wstring AppliedLayoutsFileName()
|
||||
@@ -44,8 +44,9 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-applied-layouts.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\applied-layouts.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
@@ -58,8 +58,9 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-custom-layouts.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\custom-layouts.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <FancyZonesLib/FancyZonesData/LayoutData.h>
|
||||
#include <FancyZonesLib/ModuleConstants.h>
|
||||
|
||||
#include <common/SettingsAPI/FileWatcher.h>
|
||||
#include <common/SettingsAPI/settings_helpers.h>
|
||||
|
||||
@@ -40,8 +39,9 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-default-layouts.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\default-layouts.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
@@ -32,12 +32,13 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-layout-hotkeys.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\layout-hotkeys.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
void LoadData();
|
||||
|
||||
std::optional<GUID> GetLayoutId(int key) const noexcept;
|
||||
size_t GetHotkeysCount() const noexcept;
|
||||
|
||||
|
||||
@@ -29,8 +29,9 @@ public:
|
||||
std::wstring saveFolderPath = PTSettingsHelper::get_module_save_folder_location(NonLocalizable::ModuleKey);
|
||||
#if defined(UNIT_TESTS)
|
||||
return saveFolderPath + L"\\test-layout-templates.json";
|
||||
#endif
|
||||
#else
|
||||
return saveFolderPath + L"\\layout-templates.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
void LoadData();
|
||||
|
||||
Reference in New Issue
Block a user