Silence three gcc warnings ("ambiguous else")

Originally committed to SVN as r6799.
This commit is contained in:
cantabile 2012-05-15 14:06:49 +00:00 committed by Thomas Goyne
parent 68d7677e14
commit 597b92bb7f
2 changed files with 6 additions and 3 deletions

View file

@ -337,8 +337,9 @@ void AssFile::AddLine(wxString data, int *version, AssAttachment **attach) {
else throw
"Unknown SSA file format version";
if (trueVersion != *version) {
if (!(trueVersion == 2 && *version == 1))
if (!(trueVersion == 2 && *version == 1)) {
wxLogMessage("Warning: File has the wrong extension.");
}
*version = trueVersion;
}
}

View file

@ -558,14 +558,16 @@ namespace Automation4 {
for (std::vector<ScriptFactory*>::iterator i = Factories().begin(); i != Factories().end(); ++i) {
Script *s = (*i)->Produce(filename);
if (s) {
if (!s->GetLoadedState() && log_errors)
if (!s->GetLoadedState() && log_errors) {
wxLogError(_("An Automation script failed to load. File name: '%s', error reported: %s"), filename, s->GetDescription());
}
return s;
}
}
if (log_errors)
if (log_errors) {
wxLogError(_("The file was not recognised as an Automation script: %s"), filename);
}
return new UnknownScript(filename);