Commit Graph

6 Commits

Author SHA1 Message Date
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
8c45891c80 AK: Allow overriding the Queue segment size with a template parameter 2019-11-03 12:33:51 +01:00
Andreas Kling
78a744da77 AK: Add Queue::head()
This returns a const T& for the first element in the queue, without
dequeuing it.
2019-11-03 12:09:19 +01:00
Andreas Kling
66db6f4f92 AK: Add Queue::clear() to clear out a Queue. 2019-07-28 21:34:47 +02:00
Andreas Kling
f712ead1fb AK: Add Queue::enqueue(const T&). 2019-07-13 17:00:30 +02:00
Andreas Kling
c699d9d79d AK: Add a simple Queue<T> class.
The underlying data structure is a singly-linked list of Vector<T>.
We never shift any of the vector contents around, but we batch the memory
allocations into 1000-element segments.
2019-06-15 10:35:35 +02:00