Commit graph

13 commits

Author SHA1 Message Date
Thomas Goyne
9b44f92235 Make AssEntry purely a base class and add AssInfo
Now that all the other junk is being dropped from the file, script info
lines are the only thing left which was a concrete AssEntry, and
AssEntry wasn't actually a very good way to store them.
2012-12-07 18:55:29 -08:00
Thomas Goyne
96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne
4e8e5b597c Change AssEntry::group to an enum 2012-11-25 14:01:50 -08:00
Thomas Goyne
49ed0551ad Consolidate all entries of each group when there are duplicate sections
Dealing with multiple instances of each section makes the code
significantly more complicated, and in most cases Aegisub doesn't
actually bother to handle it correctly.
2012-11-24 16:24:01 -08:00
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