1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00
serenity/Libraries/LibMarkdown
Lenny Maiorani f99d1d3bd7 Vector: Implement find, find_if, find_first_matching in terms of AK::find*
Problem:
- The implementation of `find` is coupled to the implementation of `Vector`.
- `Vector::find` takes the predicate by value which might be expensive.

Solution:
- Decouple the implementation of `find` from `Vector` by using a
  generic `find` algorithm.
- Change the name of `find` with a predicate to `find_if` so that a
  binding reference can be used and the predicate can be forwarded to
  avoid copies.
- Change all the `find(pred)` call sites to use `find_if`.
2021-01-11 19:45:05 +01:00
..
Block.h LibMarkdown: Take a 'view_width' argument for render_for_terminal() 2020-09-27 21:14:18 +02:00
CMakeLists.txt LibMarkdown: Parse horizontal rules 2021-01-02 02:41:15 +01:00
CodeBlock.cpp LibMarkdown: Use JS::MarkupGenerator for "js" code blocks :^) 2020-10-31 20:52:54 +01:00
CodeBlock.h LibMarkdown: Take a 'view_width' argument for render_for_terminal() 2020-09-27 21:14:18 +02:00
Document.cpp LibMarkdown: Parse horizontal rules 2021-01-02 02:41:15 +01:00
Document.h LibMarkdown: Take a 'view_width' argument for render_for_terminal() 2020-09-27 21:14:18 +02:00
Heading.cpp LibMarkdown: Don't parse lines starting with a space as heading 2020-10-26 19:13:19 +01:00
Heading.h LibMarkdown: Don't parse lines starting with a space as heading 2020-10-26 19:13:19 +01:00
HorizontalRule.cpp LibMarkdown: Parse horizontal rules 2021-01-02 02:41:15 +01:00
HorizontalRule.h LibMarkdown: Parse horizontal rules 2021-01-02 02:41:15 +01:00
List.cpp LibMarkdown: Take a 'view_width' argument for render_for_terminal() 2020-09-27 21:14:18 +02:00
List.h LibMarkdown: Take a 'view_width' argument for render_for_terminal() 2020-09-27 21:14:18 +02:00
Paragraph.cpp LibMarkdown: Parse paragraphs line-wise 2020-09-27 21:14:18 +02:00
Paragraph.h LibMarkdown: Parse paragraphs line-wise 2020-09-27 21:14:18 +02:00
Table.cpp LibMarkdown: Reduce debug spam from invalid characters in table headings 2020-11-30 11:35:45 +01:00
Table.h LibMarkdown: Add support for Tables 2020-09-27 21:14:18 +02:00
Text.cpp Vector: Implement find, find_if, find_first_matching in terms of AK::find* 2021-01-11 19:45:05 +01:00
Text.h LibMarkdown: Add a Text(String) constructor 2020-09-27 21:14:18 +02:00