From 0faf86c2b95bca16b3777f4e5775fb2c7e98cb88 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 10 Dec 2014 07:57:46 +0100 Subject: ReplayGainInfo: add method IsDefined() --- src/ReplayGainInfo.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ReplayGainInfo.hxx') 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(); -- cgit v1.2.3