mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
AK: Make Queue use size_t for its size
This commit is contained in:
parent
ceec1a7d38
commit
fbe4081f4b
Notes:
sideshowbarker
2024-07-19 09:04:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fbe4081f4be
@ -38,7 +38,7 @@ public:
|
||||
Queue() { }
|
||||
~Queue() { }
|
||||
|
||||
int size() const { return m_size; }
|
||||
size_t size() const { return m_size; }
|
||||
bool is_empty() const { return m_size == 0; }
|
||||
|
||||
void enqueue(T&& value)
|
||||
@ -81,8 +81,8 @@ public:
|
||||
|
||||
private:
|
||||
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
|
||||
int m_index_into_first { 0 };
|
||||
int m_size { 0 };
|
||||
size_t m_index_into_first { 0 };
|
||||
size_t m_size { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void AudioEngine::fill_buffer(FixedArray<Sample>& buffer)
|
||||
}
|
||||
|
||||
if (m_delay) {
|
||||
if (m_delay_buffers.size() >= m_delay) {
|
||||
if (m_delay_buffers.size() >= static_cast<size_t>(m_delay)) {
|
||||
auto to_blend = m_delay_buffers.dequeue();
|
||||
for (size_t i = 0; i < to_blend->size(); ++i) {
|
||||
buffer[i].left += (*to_blend)[i].left * 0.333333;
|
||||
|
Loading…
Reference in New Issue
Block a user