Cleanup: two lines can be one.
authorCarl Hetherington <cth@carlh.net>
Mon, 16 Oct 2023 21:12:52 +0000 (23:12 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 16 Oct 2023 21:12:52 +0000 (23:12 +0200)
src/sound_asset_writer.cc

index 491709909daad9401cca55c33e0f0e893ea0d00e..9ec939247fda6a32b90ce747b3274d2623f0b95c 100644 (file)
@@ -209,8 +209,7 @@ LIBDCP_ENABLE_WARNINGS
 
                /* Remove duplicates */
                std::sort(dcp_channels.begin(), dcp_channels.end());
-               auto last = std::unique(dcp_channels.begin(), dcp_channels.end());
-               dcp_channels.erase(last, dcp_channels.end());
+               dcp_channels.erase(std::unique(dcp_channels.begin(), dcp_channels.end()), dcp_channels.end());
 
                for (auto dcp_channel: dcp_channels) {
                        auto channel = new ASDCP::MXF::AudioChannelLabelSubDescriptor(asdcp_smpte_dict);