summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-09 20:19:47 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-09 20:19:47 +0200
commit20d5f98f1b72ad2152bfdceb2d18c3d593e6202a (patch)
tree144d7cffa29192b30c5c7e14e33739d93aa165e6 /src
parent41ec2d96e2012ebb766b6dd0c65f80be61584bfb (diff)
Cleanup: substr() can accept npos for the second parameter.
Diffstat (limited to 'src')
-rw-r--r--src/wx/dcp_panel.cc5
1 files changed, 1 insertions, 4 deletions
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;