From 1d041ad5b123e4ecbe69dfa621349f6be9b933d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 17 Aug 2022 14:11:07 +0200 Subject: Minor cleanup. --- c/data.h | 1 + c/datalistview.cpp | 1 + c/debug.cpp | 2 +- c/episodelistview.cpp | 3 +-- c/episodelistview.h | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/c/data.h b/c/data.h index dd443b9..c799e52 100644 --- a/c/data.h +++ b/c/data.h @@ -2,6 +2,7 @@ #define DATA_H #include +#include #include "pl.h" #include "util.h" diff --git a/c/datalistview.cpp b/c/datalistview.cpp index f04b270..9b3de7a 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -10,6 +10,7 @@ #include "listview.h" #include "layout.h" #include "pl.h" +#include "wcharptr.h" DataListView::DataListView(const HWND hWndParent) : ListView(hWndParent, reinterpret_cast(IDC_DATALISTVIEW), LVS_NOCOLUMNHEADER) diff --git a/c/debug.cpp b/c/debug.cpp index b23df37..a7f7595 100644 --- a/c/debug.cpp +++ b/c/debug.cpp @@ -11,13 +11,13 @@ struct Avg { long long sum; }; +static LARGE_INTEGER liFreq; static long long freq; Benchmark::Benchmark(const char* const name, const int id, const int avgmax) : id(id), avgmax(avgmax), name(name) { if (!freq) { - static LARGE_INTEGER liFreq; if (!QueryPerformanceFrequency(&liFreq)) throw Win32Error{}; freq = liFreq.QuadPart; diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 824b527..f004f8a 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -13,8 +13,7 @@ #include "win.h" EpisodeListView::EpisodeListView(const HWND hWndParent) - : ListView(hWndParent, reinterpret_cast(IDC_EPISODELISTVIEW), 0), - m_fv(L"elvdata.dat", ELVMAX) + : ListView(hWndParent, reinterpret_cast(IDC_EPISODELISTVIEW), 0) { LVCOLUMN lvc; diff --git a/c/episodelistview.h b/c/episodelistview.h index ee5bc22..62ce42e 100644 --- a/c/episodelistview.h +++ b/c/episodelistview.h @@ -35,7 +35,7 @@ struct EpisodeListView : public ListView private: int m_iSortCol; static int CALLBACK SortProc(LPARAM lParam1, LPARAM lParam2, LPARAM extra); - FileView m_fv; + FileView m_fv{L"elvdata.dat", ELVMAX}; }; #endif -- cgit v1.2.3