mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
CMake file
Update to C++ 11: std::shared_ptr, for each loops Update to wxWidgets 3.0+
This commit is contained in:
+1
-14
@@ -154,17 +154,8 @@ void Package::clearKeepFlag() {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Package : inside
|
||||
|
||||
#if 0
|
||||
/// Class that is a wxZipInputStream over a wxFileInput stream
|
||||
/** Note that wxFileInputStream is also a base class, because it must be constructed first
|
||||
* This class requires a patch in wxWidgets (2.5.4)
|
||||
* change zipstrm.cpp line 1745:;
|
||||
* if ((!m_ffile || AtHeader()));
|
||||
* to:
|
||||
* if ((AtHeader()));
|
||||
* It seems that in 2.6.3 this is no longer necessary (TODO: test)
|
||||
*
|
||||
* NOTE: Not used with wx 2.6.3, since it doesn't support seeking
|
||||
*/
|
||||
class ZipFileInputStream : private wxFileInputStream, public wxZipInputStream {
|
||||
public:
|
||||
@@ -175,7 +166,6 @@ class ZipFileInputStream : private wxFileInputStream, public wxZipInputStream {
|
||||
OpenEntry(*entry);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
class BufferedFileInputStream_aux {
|
||||
protected:
|
||||
@@ -219,10 +209,7 @@ InputStreamP Package::openIn(const String& file) {
|
||||
stream = shared(new BufferedFileInputStream(filename+_("/")+file));
|
||||
} else if (wxFileExists(filename) && it != files.end() && it->second.zipEntry) {
|
||||
// a file in a zip archive
|
||||
// somebody in wx thought seeking was no longer needed, it now only works with the 'compatability constructor'
|
||||
stream = shared(new wxZipInputStream(filename, it->second.zipEntry->GetInternalName()));
|
||||
//stream = static_pointer_cast<wxZipInputStream>(
|
||||
// shared(new ZipFileInputStream(filename, it->second.zipEntry)));
|
||||
stream = static_pointer_cast<wxZipInputStream>(shared(new ZipFileInputStream(filename, it->second.zipEntry)));
|
||||
} else {
|
||||
// shouldn't happen, packaged changed by someone else since opening it
|
||||
throw FileNotFoundError(file, filename);
|
||||
|
||||
Reference in New Issue
Block a user