diff options
author | John Ankarström <john@ankarstrom.se> | 2022-09-02 02:11:49 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-09-02 02:14:11 +0200 |
commit | 90c7bc237c9cf964c16f0cb48c308a92a8193a5c (patch) | |
tree | 53f165056dffa061a9dfe39b76913edab87056f4 /c/test.cpp | |
parent | bb9280267bfb78a8d69adea02f5ed7894833b19d (diff) | |
download | EpisodeBrowser-90c7bc237c9cf964c16f0cb48c308a92a8193a5c.tar.gz |
Use global Window object.
This makes it easier to control initialization and maintain RAII.
Diffstat (limited to 'c/test.cpp')
-rw-r--r-- | c/test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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<ElvDataA> 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<CfgB> fvb = FileView<CfgB>::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; |