mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[CPP][Analyzers]Turn on warning 4127 (#21516)
Fix an occurrence on a if changing it to if constexpr
This commit is contained in:
@@ -13,7 +13,7 @@ namespace // Strings in this namespace should not be localized
|
||||
{
|
||||
const wchar_t LATEST_RELEASE_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases/latest";
|
||||
const wchar_t ALL_RELEASES_ENDPOINT[] = L"https://api.github.com/repos/microsoft/PowerToys/releases";
|
||||
|
||||
|
||||
const wchar_t LOCAL_BUILD_ERROR[] = L"Local build cannot be updated";
|
||||
const wchar_t NETWORK_ERROR[] = L"Network error";
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace updating
|
||||
std::future<nonstd::expected<github_version_info, std::wstring>> get_github_version_info_async(const bool prerelease)
|
||||
{
|
||||
// If the current version starts with 0.0.*, it means we're on a local build from a farm and shouldn't check for updates.
|
||||
if (VERSION_MAJOR == 0 && VERSION_MINOR == 0)
|
||||
if constexpr (VERSION_MAJOR == 0 && VERSION_MINOR == 0)
|
||||
{
|
||||
co_return nonstd::make_unexpected(LOCAL_BUILD_ERROR);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ LONG WINAPI unhandled_exception_handler(PEXCEPTION_POINTERS info)
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
extern "C" void AbortHandler(int signal_number)
|
||||
extern "C" void AbortHandler(int /*signal_number*/)
|
||||
{
|
||||
init_symbols();
|
||||
std::wstring ex_description = L"SIGABRT was raised.";
|
||||
|
||||
Reference in New Issue
Block a user