mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
AK: Allow overriding the Queue segment size with a template parameter
This commit is contained in:
parent
78a744da77
commit
8c45891c80
Notes:
sideshowbarker
2024-07-19 11:27:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8c45891c800
@ -6,7 +6,7 @@
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<typename T>
|
||||
template<typename T, int segment_size = 1000>
|
||||
class Queue {
|
||||
public:
|
||||
Queue() { }
|
||||
@ -54,8 +54,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
static const int segment_size = 1000;
|
||||
|
||||
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
|
||||
int m_index_into_first { 0 };
|
||||
int m_size { 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user