diff options
author | Aki <please@ignore.pl> | 2022-04-10 15:24:32 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-10 15:25:02 +0200 |
commit | 034aa81895b201164004d79aa090e882e3e66945 (patch) | |
tree | 502ad20a5488c3258c866514e9a286e89321f8f4 /StarsEx/DataLoader.cpp | |
parent | e8c40a99cb00ea7f68dcb1b8414065785c89df9c (diff) | |
download | starshatter-034aa81895b201164004d79aa090e882e3e66945.zip starshatter-034aa81895b201164004d79aa090e882e3e66945.tar.gz starshatter-034aa81895b201164004d79aa090e882e3e66945.tar.bz2 |
Moved archives list from static part of impl to loader member
Including Archive.h in DataLoader.h created name conflicts and created
an error due to missing types from Types.h in the Archive.h itself.
Diffstat (limited to 'StarsEx/DataLoader.cpp')
-rw-r--r-- | StarsEx/DataLoader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/StarsEx/DataLoader.cpp b/StarsEx/DataLoader.cpp index 4e35cab..72eaf4b 100644 --- a/StarsEx/DataLoader.cpp +++ b/StarsEx/DataLoader.cpp @@ -22,14 +22,17 @@ DataLoader* DataLoader::loader = 0; -static List<DataArchive> archives; - // +--------------------------------------------------------------------+ DataLoader::DataLoader() : datapath(""), video(0), use_file_system(true), enable_media(true) { } +DataLoader::~DataLoader() +{ + archives.destroy(); +} + // +--------------------------------------------------------------------+ void @@ -45,14 +48,12 @@ DataLoader::Initialize() { if (!loader) { loader = new DataLoader; - archives.destroy(); } } void DataLoader::Close() { - archives.destroy(); Bitmap::ClearCache(); delete loader; loader = nullptr; |