From 843e16b177a825242d7ca53adc61e6ffa3d1df7a Mon Sep 17 00:00:00 2001 From: jyelon Date: Sun, 29 Mar 2026 01:14:58 -0400 Subject: [PATCH] Starting to convert old search functions to new ones --- Content/Testing/BP_Test.uasset | 4 +- .../UEWingman/Handlers/ActorComponent_Add.h | 4 +- .../Handlers/ActorComponent_Reparent.h | 2 +- .../Handlers/BlueprintGraph_Create.h | 2 +- .../Handlers/BlueprintVariable_Create.h | 2 +- .../Handlers/EventDispatcher_Create.h | 4 +- .../Handlers/EventDispatcher_Delete.h | 4 +- .../UEWingman/Handlers/EventDispatcher_Dump.h | 4 +- .../Handlers/EventDispatcher_Modify.h | 4 +- .../Source/UEWingman/Handlers/Widget_Create.h | 4 +- .../UEWingman/Handlers/Widget_Reparent.h | 2 +- .../UEWingman/Private/WingBlueprintVar.cpp | 2 +- .../Source/UEWingman/Private/WingFetcher.cpp | 12 ++-- .../Source/UEWingman/Private/WingManual.cpp | 62 +++++++++---------- .../UEWingman/Private/WingTokenizer.cpp | 2 +- .../Source/UEWingman/Private/WingUtils.cpp | 2 +- .../Source/UEWingman/Public/WingManual.h | 2 +- .../Source/UEWingman/Public/WingUtils.h | 8 +-- 18 files changed, 62 insertions(+), 64 deletions(-) diff --git a/Content/Testing/BP_Test.uasset b/Content/Testing/BP_Test.uasset index 28e1bcf9..f5e81a75 100644 --- a/Content/Testing/BP_Test.uasset +++ b/Content/Testing/BP_Test.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ad535d90d8e35c0c89b8762e8d1fe1a73948d4ad7eb2ea79792c0e17d2cc789 -size 44316 +oid sha256:24ab1c9e1c3fadda0d7e0f780d363808cc61e17ad912d212080714dd0811bbee +size 44331 diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Add.h b/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Add.h index f42663d8..e0821d3f 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Add.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Add.h @@ -50,7 +50,7 @@ public: // Check that the proposed name is valid TArray AllComponents = UWingComponentReference::GetAll(BP); - if (!WingUtils::FindExactlyNoneNamed(Component, AllComponents, TEXT("Component"))) return; + if (!WingUtils::FindNoneWithExternalID(Component, AllComponents, TEXT("Component"))) return; FString InternalName = WingUtils::CheckProposedName(Component); if (InternalName.IsEmpty()) return; @@ -65,7 +65,7 @@ public: if (!UWingComponentReference::CheckValidComponentClass(ComponentClass)) return; // Find the specified parent component - UWingComponentReference* ParentComp = WingUtils::FindExactlyOneNamed(Parent, AllComponents, TEXT("Component")); + UWingComponentReference* ParentComp = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component")); if (!ParentComp) return; // Create the SCS node diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Reparent.h b/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Reparent.h index b3188421..a19bcd93 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Reparent.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/ActorComponent_Reparent.h @@ -42,7 +42,7 @@ public: // Find the new parent among all components (if specified) UBlueprint *BP = CompRef->BP; TArray AllComponents = UWingComponentReference::GetAll(BP); - UWingComponentReference* NewParent = WingUtils::FindExactlyOneNamed(Parent, AllComponents, TEXT("Component")); + UWingComponentReference* NewParent = WingUtils::FindOneWithExternalID(Parent, AllComponents, TEXT("Component")); if (!NewParent) return; if (!CompRef->ReparentComponent(NewParent)) return; diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintGraph_Create.h b/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintGraph_Create.h index afb2c062..b2660b52 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintGraph_Create.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintGraph_Create.h @@ -76,7 +76,7 @@ public: } // Check graph name uniqueness and legality - if (!WingUtils::FindExactlyNoneNamed(Graph, WingUtils::AllGraphs(BP), TEXT("Graph"))) + if (!WingUtils::FindNoneWithExternalID(Graph, WingUtils::AllGraphs(BP), TEXT("Graph"))) return; FString InternalName = WingUtils::CheckProposedName(Graph); if (InternalName.IsEmpty()) return; diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintVariable_Create.h b/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintVariable_Create.h index 2654a53b..cbe66038 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintVariable_Create.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/BlueprintVariable_Create.h @@ -45,7 +45,7 @@ public: if (!BP) return; // Check validity of the proposed name - if (!WingUtils::FindExactlyNoneNamed(Name, BP->NewVariables, TEXT("Variable"))) return; + if (!WingUtils::FindNoneWithExternalID(Name, BP->NewVariables, TEXT("Variable"))) return; FString InternalName = WingUtils::CheckProposedName(Name); if (InternalName.IsEmpty()) return; FName VarFName(InternalName); diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Create.h b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Create.h index e70d585c..e076053e 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Create.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Create.h @@ -43,8 +43,8 @@ public: if (!BP) return; // Check for valid proposed name - if (!WingUtils::FindExactlyNoneNamed(Dispatcher, BP->NewVariables, TEXT("Variable"))) return; - if (!WingUtils::FindExactlyNoneNamed(Dispatcher, WingUtils::AllGraphs(BP), TEXT("Graph"))) return; + if (!WingUtils::FindNoneWithExternalID(Dispatcher, BP->NewVariables, TEXT("Variable"))) return; + if (!WingUtils::FindNoneWithExternalID(Dispatcher, WingUtils::AllGraphs(BP), TEXT("Graph"))) return; FString InternalName = WingUtils::CheckProposedName(Dispatcher); if (InternalName.IsEmpty()) return; FName VarFName(InternalName); diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Delete.h b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Delete.h index 042a1c9c..eacfaea4 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Delete.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Delete.h @@ -37,9 +37,9 @@ public: UBlueprint* BP = F.Walk(Blueprint).Cast(); if (!BP) return; - FBPVariableDescription* Var = WingUtils::FindExactlyOneNamed(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); + FBPVariableDescription* Var = WingUtils::FindOneWithExternalID(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); if (!Var) return; - TObjectPtr* SigGraph = WingUtils::FindExactlyOneNamed(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); + TObjectPtr* SigGraph = WingUtils::FindOneWithExternalID(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); if (!SigGraph) return; UEdGraph* Graph = *SigGraph; diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Dump.h b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Dump.h index 7d086e79..45e1c8ee 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Dump.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Dump.h @@ -39,9 +39,9 @@ public: UBlueprint* BP = F.Walk(Blueprint).Cast(); if (!BP) return; - FBPVariableDescription* Var = WingUtils::FindExactlyOneNamed(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); + FBPVariableDescription* Var = WingUtils::FindOneWithExternalID(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); if (!Var) return; - TObjectPtr* SigGraph = WingUtils::FindExactlyOneNamed(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); + TObjectPtr* SigGraph = WingUtils::FindOneWithExternalID(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); if (!SigGraph) return; TWeakObjectPtr EntryNode; diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Modify.h b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Modify.h index b9a2860e..7e692fdc 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Modify.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/EventDispatcher_Modify.h @@ -41,9 +41,9 @@ public: UBlueprint* BP = F.Walk(Blueprint).Cast(); if (!BP) return; - FBPVariableDescription* Var = WingUtils::FindExactlyOneNamed(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); + FBPVariableDescription* Var = WingUtils::FindOneWithExternalID(Dispatcher, BP->NewVariables, TEXT("Dispatcher")); if (!Var) return; - TObjectPtr* SigGraph = WingUtils::FindExactlyOneNamed(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); + TObjectPtr* SigGraph = WingUtils::FindOneWithExternalID(Dispatcher, BP->DelegateSignatureGraphs, TEXT("Dispatcher Signature Graph")); if (!SigGraph) return; // Make sure the argument types are valid. diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Create.h b/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Create.h index 95551620..db2656f5 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Create.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Create.h @@ -72,13 +72,13 @@ public: // Check that the name is unique among existing widgets. TArray AllWidgets; Tree->GetAllWidgets(AllWidgets); - if (!WingUtils::FindExactlyNoneNamed(Name, AllWidgets, TEXT("Widget"))) return; + if (!WingUtils::FindNoneWithExternalID(Name, AllWidgets, TEXT("Widget"))) return; // If a parent is specified, find it and verify it's a panel. UPanelWidget* ParentPanel = nullptr; if (!Parent.IsEmpty()) { - UWidget* ParentWidget = WingUtils::FindExactlyOneNamed(Parent, AllWidgets, TEXT("Widget")); + UWidget* ParentWidget = WingUtils::FindOneWithExternalID(Parent, AllWidgets, TEXT("Widget")); if (!ParentWidget) return; if (!WingWidgets::CheckCanBeParent(ParentWidget)) return; ParentPanel = Cast(ParentWidget); diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Reparent.h b/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Reparent.h index 480fdd1c..21e9aca5 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Reparent.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/Widget_Reparent.h @@ -56,7 +56,7 @@ public: FString WidgetName = WingUtils::FormatName(TargetWidget); // Find the new parent and verify it's a panel with room. - UWidget* ParentWidget = WingUtils::FindExactlyOneNamed(Parent, AllWidgets, TEXT("Widget")); + UWidget* ParentWidget = WingUtils::FindOneWithExternalID(Parent, AllWidgets, TEXT("Widget")); if (!ParentWidget) return; if (!WingWidgets::CheckCanBeParent(ParentWidget)) return; UPanelWidget* ParentPanel = Cast(ParentWidget); diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingBlueprintVar.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingBlueprintVar.cpp index f4b2ac5c..a4889acb 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingBlueprintVar.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingBlueprintVar.cpp @@ -7,7 +7,7 @@ FWingBlueprintVar::FWingBlueprintVar(UBlueprint* BP, const FString& VarName) { - Desc = WingUtils::FindExactlyOneNamed(VarName, BP->NewVariables, TEXT("Variable")); + Desc = WingUtils::FindOneWithExternalID(VarName, BP->NewVariables, TEXT("Variable")); if (!Desc) return; if (Desc->VarType.PinCategory == UEdGraphSchema_K2::PC_MCDelegate) { diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingFetcher.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingFetcher.cpp index b747da88..cdc8b4a5 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingFetcher.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingFetcher.cpp @@ -89,7 +89,7 @@ WingFetcher& WingFetcher::Walk(const FString& Path) { UWingServer::Printf(TEXT("ERROR: Paths may not contain whitespace.")); UWingServer::SuggestManual(WingManual::Section::Paths); - UWingServer::SuggestManual(WingManual::Section::IdentifierSanitization); + UWingServer::SuggestManual(WingManual::Section::EscapeSequences); return SetError(); } TArray Segments; @@ -224,7 +224,7 @@ WingFetcher& WingFetcher::Graph(const FString& Value) } TArray Graphs = WingUtils::AllGraphs(BP); - UEdGraph* Found = WingUtils::FindExactlyOneNamed(Value, Graphs, TEXT("graph")); + UEdGraph* Found = WingUtils::FindOneWithExternalID(Value, Graphs, TEXT("graph")); if (!Found) { UWingServer::Printf(TEXT("Graphs that exist in blueprint:\n")); @@ -253,7 +253,7 @@ WingFetcher& WingFetcher::Node(const FString& Value) // Get the nodes from the graph. TArray AllNodes = WingUtils::AllNodes(Graph); - UEdGraphNode *Node = WingUtils::FindExactlyOneNamed(Value, AllNodes, TEXT("node")); + UEdGraphNode *Node = WingUtils::FindOneWithExternalID(Value, AllNodes, TEXT("node")); if (Node == nullptr) { UWingServer::Printf(TEXT("Nodes that exist in graph:\n")); @@ -277,7 +277,7 @@ WingFetcher& WingFetcher::Pin(const FString& Value) TypeMismatch(TEXT("pin"), TEXT("node")); return SetError(); } - UEdGraphPin *Found = WingUtils::FindExactlyOneNamed(Value, N->Pins, TEXT("pin")); + UEdGraphPin *Found = WingUtils::FindOneWithExternalID(Value, N->Pins, TEXT("pin")); if (!Found) { UWingServer::Printf(TEXT("Pins that exist in the node:\n")); @@ -303,7 +303,7 @@ WingFetcher& WingFetcher::Component(const FString& Value) } TArray AllComponents = UWingComponentReference::GetAll(BP); - UWingComponentReference* Found = WingUtils::FindExactlyOneNamed(Value, AllComponents, TEXT("component")); + UWingComponentReference* Found = WingUtils::FindOneWithExternalID(Value, AllComponents, TEXT("component")); if (!Found) { UWingServer::Printf(TEXT("Components that exist in the blueprint:\n")); @@ -331,7 +331,7 @@ WingFetcher& WingFetcher::Widget(const FString& Value) TArray AllWidgets; WidgetBP->WidgetTree->GetAllWidgets(AllWidgets); - UWidget* Found = WingUtils::FindExactlyOneNamed(Value, AllWidgets, TEXT("widget")); + UWidget* Found = WingUtils::FindOneWithExternalID(Value, AllWidgets, TEXT("widget")); if (!Found) { UWingServer::Printf(TEXT("Widgets that exist in the blueprint:\n")); diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp index f2f32932..7926eb18 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp @@ -9,7 +9,7 @@ TSet WingManual::AllSections() Section::Paths, Section::Types, Section::ParameterLists, - Section::IdentifierSanitization, + Section::EscapeSequences, Section::Whitespace, Section::MaterialEditing, Section::ImportantCommands, @@ -111,9 +111,9 @@ void WingManual::PrintManual(TSet
Sections, UClass *Handler, bool Abrid "\n with an asset name, followed by steps separated by ," "\n that navigate into the asset. Some Examples:" "\n" - "\n /Game/Widgets/WB_Hotkeys,widget:Canvas·122" - "\n /Game/Testing/BP_Test,graph:Rescale·Actor,node:K2Node_CallFunction_0,pin:Scale" - "\n /Game/Chars/BP_Manny,component:Camera·Boom" + "\n /Game/Widgets/WB_Hotkeys,widget:Canvas.122" + "\n /Game/Testing/BP_Test,graph:Rescale.Actor,node:K2Node_CallFunction_0,pin:Scale" + "\n /Game/Chars/BP_Manny,component:Camera.Boom" "\n" "\n The navigation steps supported are:" "\n" @@ -201,47 +201,45 @@ void WingManual::PrintManual(TSet
Sections, UClass *Handler, bool Abrid } } - if (Sections.Contains(Section::IdentifierSanitization)) + if (Sections.Contains(Section::EscapeSequences)) { if (Abridged) { UWingServer::Print(TEXT( - "\n IDENTIFIER SANITIZATION:" - "\n Identifiers in unreal can contain whitespace and punctuation." - "\n We sanitize these characters on output:" + "\n USING HTML ESCAPE SEQUENCES:" + "\n When we output FNames, we use HTML escape sequences for the" + "\n following marks: \\\"'(),.:;<=>& We also escape control" + "\n characters, and some (but not all) unicode characters." + "\n We also translate spaces to periods. Examples:" "\n" - "\n space → ·" - "\n < → ◁" - "\n > → ▷" - "\n , → ▾" + "\n FName(TEXT(\"No_Change\")) --> No_Change" + "\n FName(TEXT(\"ίδιος\")) --> ίδιος" + "\n FName(TEXT(\"✡✢❄\")) --> ✡✢❄" + "\n FName(TEXT(\"Hello.There\")) --> Hello.There" + "\n FName(TEXT(\"Hello There\")) --> Hello.There" + "\n FName(TEXT(\"Hello\n\")) --> Hello " "\n " - "\n We do the reverse translation on input. Therefore, you will always" - "\n see sanitized versions of identifiers, and you must always use" - "\n sanitized versions of identifiers:" + "\n When sending FNames to UE Wingman, you *must* escape the marks" + "\n listed above and control characters, but you *may* escape" + "\n any character. To send an FName with a space in it, either" + "\n use or a period." + "\n" + "\n Currently, this escaping *only* applies to FNames. It" + "\n doesn't work to use escapes in asset names or file names." "\n" )); } else { UWingServer::Print(TEXT( - "\n IDENTIFIER SANITIZATION:" + "\n USING HTML ESCAPE SEQUENCES:" + "\n When we output FNames, we use HTML escape sequences for the" + "\n following marks: \\\"'(),.:;<=>&, and for certain other characters." + "\n We also translate spaces to periods." "\n" - "\n Identifiers in Unreal can contain spaces and punctuation marks." - "\n Those punctuation marks could confuse our parsers. For example," - "\n How would we parse Array if the typename X contained a less-than?" - "\n So, we automatically translate these characters on output:" - "\n" - "\n space → ·" - "\n < → ◁" - "\n > → ▷" - "\n , → ▾" - "\n " - "\n We do the reverse translation on input. Therefore, you will always" - "\n see sanitized versions of identifiers, and you must always use" - "\n sanitized versions of identifiers:" - "\n" - "\n Correct: /Game/Testing/BP_Test,graph:Get·Cursor·Location" - "\n Wrong: /Game/Testing/BP_Test,graph:Get Cursor Location" + "\n When sending FNames to UE Wingman, you *must* escape the marks" + "\n listed above, but you *may* escape any character. To send an FName" + "\n with a space in it, either use or a period." "\n" )); } diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingTokenizer.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingTokenizer.cpp index 4405dc6e..384de0c0 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingTokenizer.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingTokenizer.cpp @@ -307,7 +307,7 @@ FString WingTokenizer::CheckInternalizeID(const FString &ExternalID) if (!Error.IsEmpty()) { UWingServer::Printf(TEXT("%s\n"), *Error); - UWingServer::SuggestManual(WingManual::Section::IdentifierSanitization); + UWingServer::SuggestManual(WingManual::Section::EscapeSequences); } return InternalID; } diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingUtils.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingUtils.cpp index 60b1cb79..5db1a7fb 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingUtils.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingUtils.cpp @@ -77,7 +77,7 @@ FString WingUtils::CheckProposedName(const FString &ExternalID) { UWingServer::Printf(TEXT("ERROR: id %s would not be a readable id, may not create item with this name"), *ExternalID); - UWingServer::SuggestManual(WingManual::Section::IdentifierSanitization); + UWingServer::SuggestManual(WingManual::Section::EscapeSequences); return FString(); } return InternalID; diff --git a/Plugins/UEWingman/Source/UEWingman/Public/WingManual.h b/Plugins/UEWingman/Source/UEWingman/Public/WingManual.h index 85ba6236..f941e95d 100644 --- a/Plugins/UEWingman/Source/UEWingman/Public/WingManual.h +++ b/Plugins/UEWingman/Source/UEWingman/Public/WingManual.h @@ -10,7 +10,7 @@ public: Paths, Types, ParameterLists, - IdentifierSanitization, + EscapeSequences, Whitespace, MaterialEditing, ImportantCommands, diff --git a/Plugins/UEWingman/Source/UEWingman/Public/WingUtils.h b/Plugins/UEWingman/Source/UEWingman/Public/WingUtils.h index 2b0265cb..096ad1da 100644 --- a/Plugins/UEWingman/Source/UEWingman/Public/WingUtils.h +++ b/Plugins/UEWingman/Source/UEWingman/Public/WingUtils.h @@ -69,7 +69,7 @@ public: static FName GetFName(const UWidget *Widget) { return Widget->GetFName(); } template - static auto FindOneWithInternalID(FName InternalID, ArrayType &Array, const TCHAR *Kind) + static auto FindOneWithInternalID(FName InternalID, ArrayType &&Array, const TCHAR *Kind) { decltype(EltAsPtr(Array, Array[0])) Result = nullptr; int Count = 0; @@ -79,7 +79,7 @@ public: } template - static auto FindOneWithExternalID(const FString &ExternalID, ArrayType &Array, const TCHAR *Kind) + static auto FindOneWithExternalID(const FString &ExternalID, ArrayType &&Array, const TCHAR *Kind) { decltype(EltAsPtr(Array, Array[0])) Result = nullptr; FName InternalID = CheckInternalizeID(ExternalID); @@ -88,7 +88,7 @@ public: } template - static bool FindNoneWithInternalID(FName InternalID, ArrayType &Array, const TCHAR *Kind) + static bool FindNoneWithInternalID(FName InternalID, ArrayType &&Array, const TCHAR *Kind) { for (auto &Elt : Array) if (GetFName(Elt) == InternalID) return CheckExactlyNoneNamed(1, Kind, InternalID); @@ -96,7 +96,7 @@ public: } template - static bool FindNoneWithExternalID(const FString &ExternalID, ArrayType &Array, const TCHAR *Kind) + static bool FindNoneWithExternalID(const FString &ExternalID, ArrayType &&Array, const TCHAR *Kind) { FName InternalID = CheckInternalizeID(ExternalID); if (InternalID.IsNone()) return false;