ReplayGainInfo: add method IsDefined()

This commit is contained in:
Max Kellermann 2014-12-10 07:57:46 +01:00
parent b30957c89c
commit 0faf86c2b9

View File

@ -51,6 +51,11 @@ struct ReplayGainTuple {
struct ReplayGainInfo { struct ReplayGainInfo {
ReplayGainTuple tuples[2]; ReplayGainTuple tuples[2];
constexpr bool IsDefined() const {
return tuples[REPLAY_GAIN_ALBUM].IsDefined() ||
tuples[REPLAY_GAIN_TRACK].IsDefined();
}
void Clear() { void Clear() {
tuples[REPLAY_GAIN_ALBUM].Clear(); tuples[REPLAY_GAIN_ALBUM].Clear();
tuples[REPLAY_GAIN_TRACK].Clear(); tuples[REPLAY_GAIN_TRACK].Clear();