aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/HanjaDic.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-11-22 09:47:07 +1100
committerNeil <nyamatongwe@gmail.com>2021-11-22 09:47:07 +1100
commit0ef4d6169062ed872c11c176af07b366b636c45e (patch)
treeb4e596c798c6e5f938fc9bfe5c4ae8a75ecb66a4 /win32/HanjaDic.cxx
parent8904b645419b8deb202046bbc785440d0d006404 (diff)
downloadscintilla-mirror-0ef4d6169062ed872c11c176af07b366b636c45e.tar.gz
Move common Win32 functions for releasing IUnknown* and DLL function access into
new WinType.h header.
Diffstat (limited to 'win32/HanjaDic.cxx')
-rw-r--r--win32/HanjaDic.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/win32/HanjaDic.cxx b/win32/HanjaDic.cxx
index 04df43845..90ba6f698 100644
--- a/win32/HanjaDic.cxx
+++ b/win32/HanjaDic.cxx
@@ -14,23 +14,11 @@
#include <windows.h>
#include <ole2.h>
+#include "WinTypes.h"
#include "HanjaDic.h"
namespace Scintilla::Internal::HanjaDict {
-struct UnknownReleaser {
- // Called by unique_ptr to destroy/free the resource
- template <class T>
- void operator()(T *pUnknown) noexcept {
- // same as ReleaseUnknown() in PlatWin.h
- try {
- pUnknown->Release();
- } catch (...) {
- // IUnknown::Release must not throw, ignore if it does.
- }
- }
-};
-
struct BSTRDeleter {
void operator()(BSTR bstr) const noexcept {
SysFreeString(bstr);