summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-11 23:19:53 +0200
committerCarl Hetherington <cth@carlh.net>2024-08-13 18:19:32 +0200
commite20e19866ef9ebf1c8bf483e5ea8173c18e8c602 (patch)
treea27f72447f961e106bc70a9a8771ab3390079768 /src
parent2b1c100e8990b266ff8b4d6c257887c94e8a809a (diff)
Tidy up some bits and pieces.
Diffstat (limited to 'src')
-rw-r--r--src/wx/closed_captions_dialog.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc
index 9142500e0..5cd8c73ef 100644
--- a/src/wx/closed_captions_dialog.cc
+++ b/src/wx/closed_captions_dialog.cc
@@ -95,7 +95,7 @@ ClosedCaptionsDialog::shown (wxShowEvent ev)
void
ClosedCaptionsDialog::track_selected ()
{
- _current = optional<TextRingBuffers::Data> ();
+ _current = {};
_viewer->slow_refresh ();
update ();
}
@@ -118,7 +118,7 @@ ClosedCaptionsDialog::paint ()
wxString const good = _lines[i].Left (MAX_CLOSED_CAPTION_LENGTH);
dc.DrawText (good, 8, line_height * i);
if (_lines[i].Length() > MAX_CLOSED_CAPTION_LENGTH) {
- wxString const bad = _lines[i].Right (_lines[i].Length() - MAX_CLOSED_CAPTION_LENGTH);
+ auto const bad = _lines[i].Right(_lines[i].Length() - MAX_CLOSED_CAPTION_LENGTH);
wxSize size = dc.GetTextExtent (good);
dc.SetTextForeground (*wxRED);
dc.DrawText (bad, 8 + size.GetWidth(), line_height * i);
@@ -167,7 +167,7 @@ ClosedCaptionsDialog::update ()
_lines[j] = "";
}
Refresh ();
- _current = optional<TextRingBuffers::Data>();
+ _current = {};
}
if (!_current && !_tracks.empty()) {
@@ -178,7 +178,7 @@ ClosedCaptionsDialog::update ()
auto track = _tracks[_track->GetSelection()];
if (butler) {
while (true) {
- optional<TextRingBuffers::Data> d = butler->get_closed_caption ();
+ auto d = butler->get_closed_caption();
if (!d) {
break;
}
@@ -225,7 +225,7 @@ ClosedCaptionsDialog::update ()
void
ClosedCaptionsDialog::clear ()
{
- _current = optional<TextRingBuffers::Data>();
+ _current = {};
_current_in_lines = false;
Refresh ();
}