diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-04-01 18:59:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-01 15:59:24 -0700 |
| commit | 9475b11045089c9bc9773b16f7eb84f843db70c4 (patch) | |
| tree | f2855e1283a3811fd771d646f6e2532ca9cb5e21 /source/core/slang-zip-file-system.cpp | |
| parent | 2a32fae2ca766862ad76973ab37605edf9ec0faa (diff) | |
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.
Diffstat (limited to 'source/core/slang-zip-file-system.cpp')
| -rw-r--r-- | source/core/slang-zip-file-system.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/core/slang-zip-file-system.cpp b/source/core/slang-zip-file-system.cpp index a56ba09db..1ed003d55 100644 --- a/source/core/slang-zip-file-system.cpp +++ b/source/core/slang-zip-file-system.cpp @@ -19,12 +19,6 @@ namespace Slang { -// Allocate static const storage for the various interface IDs that the Slang API needs to expose -static const Guid IID_ISlangUnknown = SLANG_UUID_ISlangUnknown; -static const Guid IID_ISlangFileSystem = SLANG_UUID_ISlangFileSystem; -static const Guid IID_ISlangFileSystemExt = SLANG_UUID_ISlangFileSystemExt; -static const Guid IID_ISlangMutableFileSystem = SLANG_UUID_ISlangMutableFileSystem; - class ZipFileSystemImpl : public ArchiveFileSystem { public: @@ -108,7 +102,7 @@ protected: ISlangMutableFileSystem* ZipFileSystemImpl::getInterface(const Guid& guid) { - return (guid == IID_ISlangUnknown || guid == IID_ISlangFileSystem || guid == IID_ISlangFileSystemExt || guid == IID_ISlangMutableFileSystem) ? static_cast<ISlangMutableFileSystem*>(this) : nullptr; + return (guid == ISlangUnknown::getTypeGuid() || guid == ISlangFileSystem::getTypeGuid() || guid == ISlangFileSystemExt::getTypeGuid() || guid == ISlangMutableFileSystem::getTypeGuid()) ? static_cast<ISlangMutableFileSystem*>(this) : nullptr; } // This is a very awkward hack to make it so we can get a read func, without having to implement all of the tracking etc. |
