patterns: Drastically improved time it takes to find favorites

This commit is contained in:
WerWolv
2024-12-17 23:37:39 +01:00
parent b446d7fd4a
commit ab12503f62
3 changed files with 37 additions and 22 deletions

View File

@@ -89,6 +89,8 @@ namespace hex::ui {
void traversePatternTree(pl::ptrn::Pattern &pattern, std::vector<std::string> &patternPath, const std::function<void(pl::ptrn::Pattern&)> &callback);
[[nodiscard]] std::string getDisplayName(const pl::ptrn::Pattern& pattern) const;
[[nodiscard]] std::vector<std::string> getPatternPath(const pl::ptrn::Pattern *pattern) const;
struct Filter {
std::vector<std::string> path;
std::optional<pl::core::Token::Literal> value;