aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-17 08:53:21 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-17 08:53:21 +1100
commit7f5b292b12975f58ced1e445a41c4b21a350ab9b (patch)
treedcb82773b86346c863adb2d486bd1868c6618dca /win32
parent99d16b51f142281f7d81cf3f704aff0e97bd1feb (diff)
downloadscintilla-mirror-7f5b292b12975f58ced1e445a41c4b21a350ab9b.tar.gz
Remove DynamicLibrary as loading lexers with SCI_LOADLEXERLIBRARY was removed
for Scintilla 5.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 6fbd05cea..e9f451bfb 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -3410,42 +3410,6 @@ void Menu::Show(Point pt, Window &w) {
Destroy();
}
-class DynamicLibraryImpl : public DynamicLibrary {
-protected:
- HMODULE h;
-public:
- explicit DynamicLibraryImpl(const char *modulePath) noexcept {
- h = ::LoadLibraryA(modulePath);
- }
-
- ~DynamicLibraryImpl() override {
- if (h)
- ::FreeLibrary(h);
- }
-
- // Use GetProcAddress to get a pointer to the relevant function.
- Function FindFunction(const char *name) noexcept override {
- if (h) {
- // Use memcpy as it doesn't invoke undefined or conditionally defined behaviour.
- FARPROC fp = ::GetProcAddress(h, name);
- Function f = nullptr;
- static_assert(sizeof(f) == sizeof(fp));
- memcpy(&f, &fp, sizeof(f));
- return f;
- } else {
- return nullptr;
- }
- }
-
- bool IsValid() noexcept override {
- return h != NULL;
- }
-};
-
-DynamicLibrary *DynamicLibrary::Load(const char *modulePath) {
- return static_cast<DynamicLibrary *>(new DynamicLibraryImpl(modulePath));
-}
-
ColourDesired Platform::Chrome() {
return ColourDesired(::GetSysColor(COLOR_3DFACE));
}