From 0468cd0d1a8a1cff1d838a741b050ef11f6d7461 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 8 Apr 2023 01:11:27 +0800 Subject: Add SLANG_IID_PPV_ARGS (#2784) * Add SLANG_IID_PPV_ARGS To mirror IID_PPV_ARGS from the COM Coding Practices: https://learn.microsoft.com/en-us/windows/win32/LearnWin32/com-coding-practices#the-iid_ppv_args-macro * Make getTypeGuid constexpr --------- Co-authored-by: Yong He --- source/core/slang-castable-list-impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/core/slang-castable-list-impl.cpp') diff --git a/source/core/slang-castable-list-impl.cpp b/source/core/slang-castable-list-impl.cpp index 1cc5dc2d4..4f4b07790 100644 --- a/source/core/slang-castable-list-impl.cpp +++ b/source/core/slang-castable-list-impl.cpp @@ -113,7 +113,7 @@ Index CastableList::indexOfUnknown(ISlangUnknown* unk) // If it has a castable interface we can just look for that { ComPtr castable; - if (SLANG_SUCCEEDED(unk->queryInterface(ICastable::getTypeGuid(), (void**)castable.writeRef())) && castable) + if (SLANG_SUCCEEDED(unk->queryInterface(SLANG_IID_PPV_ARGS(castable.writeRef()))) && castable) { return indexOf(castable); } -- cgit v1.2.3