diff --git a/src/common/os-detection/os-detect.cpp b/src/common/os-detection/os-detect.cpp index b32fbb1151..71a6763d41 100644 --- a/src/common/os-detection/os-detect.cpp +++ b/src/common/os-detection/os-detect.cpp @@ -9,13 +9,7 @@ template bool IsAPIContractVxAvailable() { - static bool isAPIContractVxAvailableInitialized = false; - static bool isAPIContractVxAvailable = false; - if (!isAPIContractVxAvailableInitialized) - { - isAPIContractVxAvailableInitialized = true; - isAPIContractVxAvailable = winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion); - } + static bool isAPIContractVxAvailable = winrt::Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", APIVersion); return isAPIContractVxAvailable; }