diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:31:23 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:31:23 +0200 |
commit | 851b6f99c1248c8ec8e33322a3179c1d82fdd515 (patch) | |
tree | 5b9abf4c4e648ea48ed4873e3c4bf1b225c64daf /wx+/image_resources.cpp | |
parent | 6.1 (diff) | |
download | FreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.tar.gz FreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.tar.bz2 FreeFileSync-851b6f99c1248c8ec8e33322a3179c1d82fdd515.zip |
6.2
Diffstat (limited to 'wx+/image_resources.cpp')
-rw-r--r-- | wx+/image_resources.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wx+/image_resources.cpp b/wx+/image_resources.cpp index 7b74c161..ba725d63 100644 --- a/wx+/image_resources.cpp +++ b/wx+/image_resources.cpp @@ -62,7 +62,7 @@ private: void GlobalResources::init(const Zstring& filename) { - assert(bitmaps.empty() && anims.empty()); + assert(bitmaps.empty() && anims.empty()); wxFFileInputStream input(utfCvrtTo<wxString>(filename)); if (input.IsOk()) //if not... we don't want to react too harsh here @@ -70,12 +70,12 @@ void GlobalResources::init(const Zstring& filename) //activate support for .png files wxImage::AddHandler(new wxPNGHandler); //ownership passed - wxZipInputStream resourceFile(input, wxConvUTF8); + wxZipInputStream streamIn(input, wxConvUTF8); //do NOT rely on wxConvLocal! On failure shows unhelpful popup "Cannot convert from the charset 'Unknown encoding (-1)'!" while (true) { - std::unique_ptr<wxZipEntry> entry(resourceFile.GetNextEntry()); //take ownership! + std::unique_ptr<wxZipEntry> entry(streamIn.GetNextEntry()); //take ownership! if (!entry) break; @@ -83,9 +83,9 @@ void GlobalResources::init(const Zstring& filename) //generic image loading if (endsWith(name, L".png")) - bitmaps.insert(std::make_pair(name, wxImage(resourceFile, wxBITMAP_TYPE_PNG))); + bitmaps.insert(std::make_pair(name, wxImage(streamIn, wxBITMAP_TYPE_PNG))); else if (endsWith(name, L".gif")) - loadAnimFromZip(resourceFile, anims[name]); + loadAnimFromZip(streamIn, anims[name]); } } } |