summaryrefslogtreecommitdiffstats
path: root/src/sources
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2021-05-13 18:58:42 +0200
committerUwe Klotz <uklotz@mixxx.org>2021-05-14 20:26:44 +0200
commit3982086d1c427c8caee6b7b965ed629f256af661 (patch)
treeec2c7654e213829f5386caa0af962ed63b25b0df /src/sources
parent98d6bace3c6779bcbff836e68680937e7b513ee6 (diff)
Track: Return a copy of TrackMetadata/TrackRecord
TrackMetadata and TrackRecord are both movable and can be returned efficiently using copy elision. https://en.cppreference.com/w/cpp/language/copy_elision
Diffstat (limited to 'src/sources')
-rw-r--r--src/sources/soundsourceproxy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp
index ca7d8e630c..e34760716d 100644
--- a/src/sources/soundsourceproxy.cpp
+++ b/src/sources/soundsourceproxy.cpp
@@ -537,9 +537,9 @@ bool SoundSourceProxy::updateTrackFromSource(
// values if the corresponding file tags are missing. Depending
// on the file type some kind of tags might even not be supported
// at all and this information would get lost entirely otherwise!
- mixxx::TrackMetadata trackMetadata;
bool metadataSynchronized = false;
- m_pTrack->readTrackMetadata(&trackMetadata, &metadataSynchronized);
+ mixxx::TrackMetadata trackMetadata =
+ m_pTrack->getMetadata(&metadataSynchronized);
// If the file tags have already been parsed at least once, the
// existing track metadata should not be updated implicitly, i.e.
// if the user did not explicitly choose to (re-)import metadata
@@ -587,7 +587,7 @@ bool SoundSourceProxy::updateTrackFromSource(
<< "from file"
<< getUrl().toString();
// make sure that the trackMetadata was not messed up due to the failure
- m_pTrack->readTrackMetadata(&trackMetadata, &metadataSynchronized);
+ trackMetadata = m_pTrack->getMetadata(&metadataSynchronized);
}
// Partial import