aboutsummaryrefslogtreecommitdiffstats
path: root/src/ReplayGainInfo.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-10 07:57:46 +0100
committerMax Kellermann <max@duempel.org>2014-12-10 07:57:46 +0100
commit0faf86c2b95bca16b3777f4e5775fb2c7e98cb88 (patch)
treec60e50454f61f2a23db60ff16b8191703d81ce4b /src/ReplayGainInfo.hxx
parentb30957c89cf39c187a562a33112e52e146969e80 (diff)
downloadmpd-0faf86c2b95bca16b3777f4e5775fb2c7e98cb88.tar.gz
mpd-0faf86c2b95bca16b3777f4e5775fb2c7e98cb88.tar.xz
mpd-0faf86c2b95bca16b3777f4e5775fb2c7e98cb88.zip
ReplayGainInfo: add method IsDefined()
Diffstat (limited to 'src/ReplayGainInfo.hxx')
-rw-r--r--src/ReplayGainInfo.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ReplayGainInfo.hxx b/src/ReplayGainInfo.hxx
index 33bef36be..9b702c701 100644
--- a/src/ReplayGainInfo.hxx
+++ b/src/ReplayGainInfo.hxx
@@ -51,6 +51,11 @@ struct ReplayGainTuple {
struct ReplayGainInfo {
ReplayGainTuple tuples[2];
+ constexpr bool IsDefined() const {
+ return tuples[REPLAY_GAIN_ALBUM].IsDefined() ||
+ tuples[REPLAY_GAIN_TRACK].IsDefined();
+ }
+
void Clear() {
tuples[REPLAY_GAIN_ALBUM].Clear();
tuples[REPLAY_GAIN_TRACK].Clear();