mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-29 00:24:42 +01:00
fix possible exception sites
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "Logging.h"
|
||||
|
||||
IWICImagingFactory* _GetWIC()
|
||||
IWICImagingFactory* _GetWIC() noexcept
|
||||
{
|
||||
static IWICImagingFactory* s_Factory = nullptr;
|
||||
|
||||
@@ -44,7 +44,7 @@ IWICImagingFactory* _GetWIC()
|
||||
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
||||
ComPtr<IMFSample> LoadImageAsSample(ComPtr<IStream> imageStream, IMFMediaType* sampleMediaType)
|
||||
ComPtr<IMFSample> LoadImageAsSample(ComPtr<IStream> imageStream, IMFMediaType* sampleMediaType) noexcept
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
#include <stdint.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
Microsoft::WRL::ComPtr<IMFSample> LoadImageAsSample(Microsoft::WRL::ComPtr<IStream> imageStream, IMFMediaType* outputSampleMediaType);
|
||||
Microsoft::WRL::ComPtr<IMFSample> LoadImageAsSample(Microsoft::WRL::ComPtr<IStream> imageStream, IMFMediaType* outputSampleMediaType) noexcept;
|
||||
|
||||
@@ -14,10 +14,11 @@ constexpr inline size_t maxLogSizeMegabytes = 10;
|
||||
|
||||
void LogToFile(std::string what, const bool verbose)
|
||||
{
|
||||
const auto tempPath = std::filesystem::temp_directory_path();
|
||||
std::error_code _;
|
||||
const auto tempPath = std::filesystem::temp_directory_path(_);
|
||||
if (verbose)
|
||||
{
|
||||
const bool verboseIndicatorFilePresent = std::filesystem::exists(tempPath / L"PowerToysVideoConferenceVerbose.flag");
|
||||
const bool verboseIndicatorFilePresent = std::filesystem::exists(tempPath / L"PowerToysVideoConferenceVerbose.flag", _);
|
||||
if (!verboseIndicatorFilePresent)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user