aboutsummaryrefslogtreecommitdiff
path: root/c/common.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-18 03:25:00 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-18 03:25:00 +0200
commit53abfac6acd04dff80ec6c8cfb0dd53f2f74dadb (patch)
treee0e6ef0926e3fb77a96874fa39d7d71fcceae942 /c/common.cpp
parent03d9db8d5ff22faa27ab25264727bb09ba87d66d (diff)
downloadEpisodeBrowser-53abfac6acd04dff80ec6c8cfb0dd53f2f74dadb.tar.gz
Improve Library::GetProcAddress.
It isn't really more safe, but it removes the need for a confusing function pointer cast, which is easy to get wrong. As far as the compiler is concerned, the result is literally the same, but it does force the caller to (indirectly, via the template parameter) cast the return value, which may be a good thing.
Diffstat (limited to 'c/common.cpp')
-rw-r--r--c/common.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/c/common.cpp b/c/common.cpp
index c04d986..d503133 100644
--- a/c/common.cpp
+++ b/c/common.cpp
@@ -57,8 +57,3 @@ Library::~Library()
{
FreeLibrary(m_hModule);
}
-
-void* Library::GetProcAddress(const char* const szProc)
-{
- return (void*)::GetProcAddress(m_hModule, szProc);
-}