From 90c7bc237c9cf964c16f0cb48c308a92a8193a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 2 Sep 2022 02:11:49 +0200 Subject: Use global Window object. This makes it easier to control initialization and maintain RAII. --- c/test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/test.cpp') diff --git a/c/test.cpp b/c/test.cpp index 6e291c7..35c6904 100644 --- a/c/test.cpp +++ b/c/test.cpp @@ -4,10 +4,11 @@ #include "data.h" #include "episodelistview.h" #include "ext.h" +#include "main.h" #include "util.h" #include "win.h" -extern CfgA& g_cfg; +extern Window* g_window; struct Test { @@ -35,9 +36,8 @@ TESTS TEST(IO) { - extern FileView g_fvElv; - ElvDataA& e1_0 = g_fvElv.At(5); - ElvDataA& e2_0 = g_fvElv.At(9); + ElvDataA& e1_0 = g_window->fvElv.At(5); + ElvDataA& e2_0 = g_window->fvElv.At(9); /* Write two ElvDataA structs to disk. */ { @@ -91,7 +91,7 @@ TESTS // TEST(MigrateCfg) // { // FileView fvb = FileView::Initialized(L"cfgb.dat", 1); -// CfgA* a = &g_cfg; +// CfgA* a = &g_window->cfg; // CfgB* b = fvb+0; // #define CPY(member) b->member = a->member; -- cgit v1.2.3