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 else throw
"Unknown SSA file format version"; "Unknown SSA file format version";
if (trueVersion != *version) { if (trueVersion != *version) {
if (!(trueVersion == 2 && *version == 1)) if (!(trueVersion == 2 && *version == 1)) {
wxLogMessage("Warning: File has the wrong extension."); wxLogMessage("Warning: File has the wrong extension.");
}
*version = trueVersion; *version = trueVersion;
} }
} }

View File

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