summaryrefslogtreecommitdiff
path: root/AK/NonnullPtrVector.h
AgeCommit message (Collapse)Author
2020-01-18Meta: Add license header to source filesAndreas Kling
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.
2019-08-19NonnullPtrVector: Add ptr_at() getters for accessing the NonnullPtrAndreas Kling
Normally you want to access the T&, but sometimes you need to grab at the NonnullPtr, for example when moving it out of the Vector before a call to remove(). This is generally a weird pattern, but I don't have a better solution at the moment.
2019-07-25AK: Simplify NonnullPtrVector template a bit.Andreas Kling
Add an "ElementType" typedef to NonnullOwnPtr and NonnullRefPtr to allow clients to easily find the pointee type. Then use this to remove a template argument from NonnullPtrVector. :^)
2019-07-25AK: Share code between NonnullOwnPtrVector and NonnullRefPtrVector.Andreas Kling
These can just inherit from a shared base template. Thanks to Robin for the sweet idea :^)