From eb947b391473235911a02b7a413f806999679853 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 10 Oct 2011 17:29:26 +0000 Subject: [PATCH] Remove dead code in AssFile::CanSave Originally committed to SVN as r5724. --- aegisub/src/ass_file.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/aegisub/src/ass_file.cpp b/aegisub/src/ass_file.cpp index fd15b4671..37b66ae0e 100644 --- a/aegisub/src/ass_file.cpp +++ b/aegisub/src/ass_file.cpp @@ -263,15 +263,10 @@ bool AssFile::CanSave() { SubtitleFormat *writer = SubtitleFormat::GetWriter(filename); if (!writer) return false; - // Check if format supports timing - bool canTime = true; - //if (filename.Lower().Right(4) == ".txt") canTime = false; - // Scan through the lines AssStyle defstyle; AssStyle *curstyle; AssDialogue *curdiag; - AssAttachment *attach; for (entryIter cur=Line.begin();cur!=Line.end();cur++) { // Check style, if anything non-default is found, return false curstyle = dynamic_cast(*cur); @@ -280,14 +275,13 @@ bool AssFile::CanSave() { } // Check for attachments, if any is found, return false - attach = dynamic_cast(*cur); - if (attach) return false; + if (dynamic_cast(*cur)) return false; // Check dialog curdiag = dynamic_cast(*cur); if (curdiag) { // Timed? - if (!canTime && (curdiag->Start.GetMS() != 0 || curdiag->End.GetMS() != 0)) return false; + if (curdiag->Start.GetMS() != 0 || curdiag->End.GetMS() != 0) return false; // Overrides? curdiag->ParseASSTags();