We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a2659d commit 3cda2fcCopy full SHA for 3cda2fc
1 file changed
src/texture_loader.cpp
@@ -1,6 +1,5 @@
1
#include "texture_loader.h"
2
#include <objbase.h>
3
-#include <optional>
4
#include <wincodec.h>
5
#include <vector>
6
#include <wil/resource.h>
@@ -100,9 +99,7 @@ wil::com_ptr<ID3D11ShaderResourceView> LoadTextureFromPngMemory(ID3D11Device* de
100
99
OutputDebugStringA("LoadTextureFromPngMemory: COM already initialized with a different threading model (RPC_E_CHANGED_MODE).\n");
101
return srv;
102
}
103
- std::optional<wil::unique_couninitialize_call> coCleanup;
104
- if (coHr == S_OK)
105
- coCleanup.emplace();
+ wil::unique_couninitialize_call coCleanup;
106
107
std::vector<uint8_t> rgba;
108
int width = 0, height = 0;
0 commit comments