Commit Graph

2 Commits

Author SHA1 Message Date
sebastian nordgren
945d078d66 Enabled FStringPrefixTree usage in details view.
Changes from previous submit:
- ExpandedCustomItems uses TStringBuilder::Join()
- FStringPrefixTree::GetAllEntries() uses a const FString& to avoid a potential memcpy crash.
- Added checks to FStringPrefixTree for empty prefixes being added to the tree.
- Fixed bug where re-adding a substring along a node split boundary (eg. "FooFoo", "FooBar", "FooBar") would cause the intermediate node to be marked as a leaf (instead of the child), added tests for it.

[REVIEW] [at]richard.talbotwatkins, [at]paul.chipchase
#rnx
#preflight 636a59dc450be1d9f8261079

[CL 23069417 by sebastian nordgren in ue5-main branch]
2022-11-09 20:53:49 -05:00
sebastian nordgren
1f55cbcc9c Added FStringPrefixTree, which stores a set of strings as a tree of nodes that share common prefixes. This results in far fewer string comparisons if many strings share a common prefix, eg. with property paths.
The set "A.B", "A.C", "B" would result in a tree like this, with the asterisked nodes being leaf nodes:

|- A.
|  |- B *
|  |- C *
|- B *

[REVIEW] [at]paul.chipchase
#rnx
#preflight 6364fed81052c15f13ff64fe

[CL 22985542 by sebastian nordgren in ue5-main branch]
2022-11-04 09:19:08 -04:00