Commit graph

9 commits

Author SHA1 Message Date
Thomas Goyne b94547aa71 Drop format and header lines from the in-memory file representation
They're just pointless cruft, so drop them from the file when parsing
and re-add them when saving as ASS or SSA.
2012-11-24 16:24:00 -08:00
Martin Herkt b1e40455ed ASS: Fix script header
Previously, Aegisub wrote its "Script generated by" lines without a
semicolon to mark them as comments. As a result, it prepended these
lines every time a script was loaded and then saved again. Fix.

Also fix a bug that caused the ASS parser to treat comments before
the [Script Info] section as non-blank lines, therefore inserting a
duplicate section header whenever such comments were present.
2012-11-22 07:50:14 -08:00
Thomas Goyne 89fef06d6b Replace all uses of auto_ptr with unique_ptr 2012-11-15 18:15:39 -08:00
Thomas Goyne 67df64e879 Use range-based for loops in a bunch of places 2012-11-12 18:35:25 -08:00
Thomas Goyne 83761d881a Convert AssFile::Line to an intrusive list
Gives O(1) pointer -> iterator conversions, better memory usage, better
performance, and overall slightly simplifies the code using it.
2012-11-10 18:05:56 -08:00
Thomas Goyne ff6394c95e Throw only real exceptions from subtitle io stuff 2012-10-25 17:39:49 -07:00
Thomas Goyne 49a442bded Fix non-pch compilation 2012-10-19 08:57:56 -07:00
Thomas Goyne d3e2585faf Refactor AssParser so that AddLine is less of a monolithic monstrosity 2012-10-16 09:52:19 -07:00
Thomas Goyne 7e1bb8348a Move ASS parsing to its own class 2012-10-16 09:52:19 -07:00