mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Fix more gcc warnings
This commit is contained in:
+7
-4
@@ -210,10 +210,13 @@ InputStreamP load_resource_text(const String& name) {
|
|||||||
int len = ::SizeofResource(wxGetInstance(), hResource);
|
int len = ::SizeofResource(wxGetInstance(), hResource);
|
||||||
return shared(new wxMemoryInputStream(data, len));
|
return shared(new wxMemoryInputStream(data, len));
|
||||||
#else
|
#else
|
||||||
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/");
|
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/");
|
||||||
static String local_path = wxStandardPaths::Get().GetUserDataDir() + _("/resource/");
|
static String local_path = wxStandardPaths::Get().GetUserDataDir() + _("/resource/");
|
||||||
if (wxFileExists(path + name)) return shared(new wxFileInputStream(path + name));
|
if (wxFileExists(path + name)) {
|
||||||
else return shared(new wxFileInputStream(local_path + name));
|
return shared(new wxFileInputStream(path + name));
|
||||||
|
} else {
|
||||||
|
return shared(new wxFileInputStream(local_path + name));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ Reader::Reader(const InputStreamP& input, Packaged* package, const String& filen
|
|||||||
, input(input)
|
, input(input)
|
||||||
{
|
{
|
||||||
assert(input);
|
assert(input);
|
||||||
|
assert(input->IsOk());
|
||||||
eat_utf8_bom(*input);
|
eat_utf8_bom(*input);
|
||||||
moveNext();
|
moveNext();
|
||||||
handleAppVersion();
|
handleAppVersion();
|
||||||
@@ -403,7 +404,7 @@ template <> void Reader::handle(FileName& f) {
|
|||||||
InputStreamP in = Package::openAbsoluteFile(str);
|
InputStreamP in = Package::openAbsoluteFile(str);
|
||||||
out->Write(*in); // copy
|
out->Write(*in); // copy
|
||||||
f.assign(packaged_name);
|
f.assign(packaged_name);
|
||||||
} catch (Error) {
|
} catch (Error const&) {
|
||||||
// ignore errors
|
// ignore errors
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user