Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Best way to search in an Unreal TMap<FName, Struct[FConnectionInfo]>
- // FilterByPredicate will create a subset of a TMap with the filter applied
- // Predicate filter signature is the same as Map - "<FName, FConnectionInfo>" in this example
- // Predicate is a function that returns a bool
- // Predicate can access the entries of the map via Key (name) / Value (struct in this case)
- TMap<FName, FConnectionInfo> tmpMap = ConnectionsMap.FilterByPredicate([](const TPair<FName, FConnectionInfo>& KvP)
- { return KvP.Value.ConnectionUserName.Equals("Test") == true; });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement