Skip to content

Commit

Permalink
simplify CreateInitialize; don't use typeinfo in Release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhngtu committed Jan 16, 2024
1 parent 0d5bf07 commit 660c64f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions VietTypeATL/ComUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ _Check_return_ HRESULT CreateInitialize(_COM_Outptr_ T** ppout, Args... args) {
*ppout = p;
hr = (*ppout)->Initialize(args...);
if (FAILED(hr)) {
auto tn = std::string(typeid(T).name());
HRESULT_CHECK(hr, L"%s->Initialize failed", std::wstring(tn.begin(), tn.end()).c_str());
HRESULT_CHECK(hr, L"%hs->Initialize failed", typeid(T).name());
p->Release();
*ppout = nullptr;
}
Expand Down

0 comments on commit 660c64f

Please sign in to comment.