ReplayGainInfo: add method IsDefined()

This commit is contained in:
Max Kellermann 2014-12-10 07:57:46 +01:00
parent b30957c89c
commit 0faf86c2b9
1 changed files with 5 additions and 0 deletions

View File

@ -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();