diff options
author | Lenny Maiorani <lenny@colorado.edu> | 2020-12-24 11:23:12 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-11 19:45:05 +0100 |
commit | 853cb8af5cb16080470b29f127b1d2664c4ca2c7 (patch) | |
tree | ce9033935b9abb6b1901759880213e3da592b137 /AK/JsonPath.h | |
parent | f99d1d3bd7d6f752c490c358217c360b7e0bda80 (diff) | |
download | serenity-853cb8af5cb16080470b29f127b1d2664c4ca2c7.zip |
DoublyLinkedList: Implement `find` in terms of `AK::find`
Problem:
- The implementation of `find` is coupled to the implementation of
`DoublyLinkedList`.
- `append` and `prepend` are implemented multiple times so that
r-value references can be moved from into the new node. This is
probably not called very often because a pr-value or x-value needs
to be used here.
Solution:
- Decouple the implementation of `find` from the class by using a
generic `find` algorithm.
- Make `append` and `prepend` be function templates so that they can
have binding references which can be forwarded.
Diffstat (limited to 'AK/JsonPath.h')
0 files changed, 0 insertions, 0 deletions