From 20d5f98f1b72ad2152bfdceb2d18c3d593e6202a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 9 Jun 2024 20:19:47 +0200 Subject: Cleanup: substr() can accept npos for the second parameter. --- src/wx/dcp_panel.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index bc8ac859c..5ee65804d 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -407,10 +407,7 @@ DCPPanel::film_changed(FilmProperty p) in case the user has clicked 'Copy as name' then re-ticked 'Use ISDCF name' (#1513). */ string const name = _film->name (); - string::size_type const u = name.find("_"); - if (u != string::npos) { - _film->set_name (name.substr(0, u)); - } + _film->set_name(name.substr(0, name.find("_"))); } setup_dcp_name (); break; -- cgit v1.2.3