util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL
This commit is contained in:
@@ -138,7 +138,7 @@ AudioOutputSource::GetChunkData(const MusicChunk &chunk,
|
||||
|
||||
assert(data.size % in_audio_format.GetFrameSize() == 0);
|
||||
|
||||
if (!data.IsEmpty() && replay_gain_filter != nullptr) {
|
||||
if (!data.empty() && replay_gain_filter != nullptr) {
|
||||
replay_gain_filter_set_mode(*replay_gain_filter,
|
||||
replay_gain_mode);
|
||||
|
||||
@@ -161,7 +161,7 @@ AudioOutputSource::FilterChunk(const MusicChunk &chunk)
|
||||
{
|
||||
auto data = GetChunkData(chunk, replay_gain_filter_instance,
|
||||
&replay_gain_serial);
|
||||
if (data.IsEmpty())
|
||||
if (data.empty())
|
||||
return data;
|
||||
|
||||
/* cross-fade */
|
||||
@@ -170,7 +170,7 @@ AudioOutputSource::FilterChunk(const MusicChunk &chunk)
|
||||
auto other_data = GetChunkData(*chunk.other,
|
||||
other_replay_gain_filter_instance,
|
||||
&other_replay_gain_serial);
|
||||
if (other_data.IsEmpty())
|
||||
if (other_data.empty())
|
||||
return data;
|
||||
|
||||
/* if the "other" chunk is longer, then that trailer
|
||||
@@ -211,7 +211,7 @@ bool
|
||||
AudioOutputSource::Fill(Mutex &mutex)
|
||||
{
|
||||
if (current_chunk != nullptr && pending_tag == nullptr &&
|
||||
pending_data.IsEmpty())
|
||||
pending_data.empty())
|
||||
pipe.Consume(*std::exchange(current_chunk, nullptr));
|
||||
|
||||
if (current_chunk != nullptr)
|
||||
@@ -242,6 +242,6 @@ AudioOutputSource::ConsumeData(size_t nbytes) noexcept
|
||||
{
|
||||
pending_data.skip_front(nbytes);
|
||||
|
||||
if (pending_data.IsEmpty())
|
||||
if (pending_data.empty())
|
||||
pipe.Consume(*std::exchange(current_chunk, nullptr));
|
||||
}
|
||||
|
Reference in New Issue
Block a user