Skip to content

Commit daf6f0a

Browse files
committed
add override
1 parent 209582f commit daf6f0a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

include/dxc/Support/dxcapi.use.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,15 @@ class SpecificDllLoader : public DllLoader {
132132
return InitializeInternal(kDxCompilerLib, "DxcCreateInstance");
133133
}
134134

135-
HRESULT OverrideDll(LPCSTR dll, LPCSTR entryPoint) {
135+
HRESULT OverrideDll(LPCSTR dll, LPCSTR entryPoint) override {
136136
return InitializeInternal(dll, entryPoint);
137137
}
138138

139139
// Also bring visibility into the interface definition of this function
140140
// which takes 2 args
141141
using DllLoader::CreateInstanceImpl;
142-
HRESULT CreateInstanceImpl(REFCLSID clsid, REFIID riid, IUnknown **pResult) {
142+
HRESULT CreateInstanceImpl(REFCLSID clsid, REFIID riid,
143+
IUnknown **pResult) override {
143144
if (pResult == nullptr)
144145
return E_POINTER;
145146
if (m_dll == nullptr)
@@ -152,7 +153,7 @@ class SpecificDllLoader : public DllLoader {
152153
// which takes 3 args
153154
using DllLoader::CreateInstance2Impl;
154155
HRESULT CreateInstance2Impl(IMalloc *pMalloc, REFCLSID clsid, REFIID riid,
155-
IUnknown **pResult) {
156+
IUnknown **pResult) override {
156157
if (pResult == nullptr)
157158
return E_POINTER;
158159
if (m_dll == nullptr)
@@ -163,9 +164,9 @@ class SpecificDllLoader : public DllLoader {
163164
return hr;
164165
}
165166

166-
bool HasCreateWithMalloc() const { return m_createFn2 != nullptr; }
167+
bool HasCreateWithMalloc() const override { return m_createFn2 != nullptr; }
167168

168-
bool IsEnabled() const { return m_dll != nullptr; }
169+
bool IsEnabled() const override { return m_dll != nullptr; }
169170

170171
bool GetCreateInstanceProcs(DxcCreateInstanceProc *pCreateFn,
171172
DxcCreateInstance2Proc *pCreateFn2) const {
@@ -189,7 +190,7 @@ class SpecificDllLoader : public DllLoader {
189190
}
190191
}
191192

192-
HMODULE Detach() {
193+
HMODULE Detach() override {
193194
HMODULE hModule = m_dll;
194195
m_dll = nullptr;
195196
return hModule;

0 commit comments

Comments
 (0)