diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-07-24 01:58:25 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-07-24 01:58:25 +0100 |
| commit | 140ebe37bde0c9c9b84e8961573a7e65d3bd7b19 (patch) | |
| tree | 830d6de2e1aae3498a47fd12539542ac07bb440c /src/subtitle.cc | |
| parent | 91d8979878ba731b2d86d7aa5dc30f6a3c1a75f1 (diff) | |
Add some operator==.
Diffstat (limited to 'src/subtitle.cc')
| -rw-r--r-- | src/subtitle.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/subtitle.cc b/src/subtitle.cc index c146480..2b98cb2 100644 --- a/src/subtitle.cc +++ b/src/subtitle.cc @@ -62,3 +62,22 @@ Block::Block (RawSubtitle s) { } + +bool +sub::operator== (Subtitle const & a, Subtitle const & b) +{ + return a.from == b.from && a.to == b.to && a.fade_up == b.fade_up && a.fade_down == b.fade_down && a.lines == b.lines; +} + +bool +sub::operator== (Line const & a, Line const & b) +{ + return a.horizontal_position == b.horizontal_position && a.vertical_position == b.vertical_position && a.blocks == b.blocks; +} + +bool +sub::operator== (Block const & a, Block const & b) +{ + return a.text == b.text && a.font == b.font && a.font_size == b.font_size && a.effect == b.effect && a.effect_colour == b.effect_colour + && a.colour == b.colour && a.bold == b.bold && a.italic == b.italic && a.underline == b.underline; +} |
