From 9475b11045089c9bc9773b16f7eb84f843db70c4 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 1 Apr 2021 18:59:24 -0400 Subject: Associating GUID (or UUID) with types (#1776) * #include an absolute path didn't work - because paths were taken to always be relative. * Add mechanism to embed guid inside of type. --- source/slang/slang-dxc-support.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-dxc-support.cpp') diff --git a/source/slang/slang-dxc-support.cpp b/source/slang/slang-dxc-support.cpp index 9abc4331e..4e5e4080e 100755 --- a/source/slang/slang-dxc-support.cpp +++ b/source/slang/slang-dxc-support.cpp @@ -48,8 +48,7 @@ namespace Slang // IDxcIncludeHandler // 7f61fc7d-950d-467f-b3e3-3c02fb49187c static const Guid IID_IDxcIncludeHandler = { 0x7f61fc7d, 0x950d, 0x467f, { 0x3c, 0x02, 0xfb, 0x49, 0x18, 0x7c } }; - static const Guid IID_IUnknown = SLANG_UUID_ISlangUnknown; - + class DxcIncludeHandler : public IDxcIncludeHandler { public: @@ -109,7 +108,7 @@ namespace Slang // Used by QueryInterface for casting ISlangUnknown* getInterface(const Guid& guid) { - if (guid == IID_IUnknown || guid == IID_IDxcIncludeHandler) + if (guid == ISlangUnknown::getTypeGuid() || guid == IID_IDxcIncludeHandler) { return (ISlangUnknown*)(static_cast(this)); } -- cgit v1.2.3