aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-15 03:04:22 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-15 03:04:22 +0200
commit7153a258427d3e401914de800bfdf1c7165cab71 (patch)
tree7aa97f2c9e4dd97b6c67bedb09ef03d7f2b3f19d /c/main.cpp
parent0e56160e859d32adffb7c9df3cd78cde0bff8df8 (diff)
downloadEpisodeBrowser-7153a258427d3e401914de800bfdf1c7165cab71.tar.gz
Replace Library::Load with try_make_unique template.
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/main.cpp b/c/main.cpp
index 6a43e2c..8bf07fb 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -35,14 +35,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR tszErr;
/* Set constant values. */
- if (auto upLib = Library::Load(TEXT("uxtheme.dll")))
+ if (auto upLib = try_make_unique<Library>(TEXT("uxtheme.dll")))
if (upLib->GetProcAddress("SetWindowTheme")) {
g_bThemes = 1;
}
g_cxVScroll = GetSystemMetrics(SM_CXVSCROLL);
/* Setup fonts. */
- if (auto upLib = Library::Load(TEXT("User32.dll"))) {
+ if (auto upLib = try_make_unique<Library>(TEXT("User32.dll"))) {
if (upLib->GetProcAddress("SystemParametersInfo" WA)) {
NONCLIENTMETRICS m;
m.cbSize = sizeof(NONCLIENTMETRICS);
@@ -110,7 +110,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
ShowWindow(hWnd, nCmdShow);
/* Populate episode list view. */
- Pl("track_episodes", "update_tracked_episodes");
+ Pl("track_episodes","update_tracked_episodes");
g_lpElv->Update();
g_lpElv->RestoreFocus();
@@ -140,7 +140,7 @@ static LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
g_hWnd = (HWND)wParam;
/* Get DPI. */
- if (auto upLib = Library::Load(TEXT("User32.dll")))
+ if (auto upLib = try_make_unique<Library>(TEXT("User32.dll")))
if (auto GetDpiForWindow = (UINT (*)(HWND))upLib->GetProcAddress("GetDpiForWindow"))
g_iDPI = GetDpiForWindow(g_hWnd);