1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

AK: Allow overriding the Queue segment size with a template parameter

This commit is contained in:
Andreas Kling 2019-11-03 12:33:51 +01:00
parent 78a744da77
commit 8c45891c80

View file

@ -6,7 +6,7 @@
namespace AK { namespace AK {
template<typename T> template<typename T, int segment_size = 1000>
class Queue { class Queue {
public: public:
Queue() { } Queue() { }
@ -54,8 +54,6 @@ public:
} }
private: private:
static const int segment_size = 1000;
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments; SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
int m_index_into_first { 0 }; int m_index_into_first { 0 };
int m_size { 0 }; int m_size { 0 };