Skip to content

Commit

Permalink
const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
MothDoctor committed Sep 28, 2021
1 parent 7247497 commit 6013d68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Source/Flow/Private/FlowAsset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void UFlowAsset::HarvestNodeConnections()
{
if (ThisPin->Direction == EGPD_Output && ThisPin->LinkedTo.Num() > 0)
{
if (UEdGraphPin* LinkedPin = ThisPin->LinkedTo[0])
if (const UEdGraphPin* LinkedPin = ThisPin->LinkedTo[0])
{
const UEdGraphNode* LinkedNode = LinkedPin->GetOwningNode();
Connections.Add(ThisPin->PinName, FConnectedPin(LinkedNode->NodeGuid, LinkedPin->PinName));
Expand Down Expand Up @@ -154,9 +154,9 @@ UFlowNode* UFlowAsset::GetNode(const FGuid& Guid) const
return nullptr;
}

void UFlowAsset::AddInstance(UFlowAsset* NewInstance)
void UFlowAsset::AddInstance(UFlowAsset* Instance)
{
ActiveInstances.Add(NewInstance);
ActiveInstances.Add(Instance);
}

int32 UFlowAsset::RemoveInstance(UFlowAsset* Instance)
Expand Down Expand Up @@ -195,7 +195,7 @@ void UFlowAsset::ClearInstances()
#if WITH_EDITOR
void UFlowAsset::GetInstanceDisplayNames(TArray<TSharedPtr<FName>>& OutDisplayNames) const
{
for (UFlowAsset* Instance : ActiveInstances)
for (const UFlowAsset* Instance : ActiveInstances)
{
OutDisplayNames.Emplace(MakeShareable(new FName(Instance->GetDisplayName())));
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Flow/Public/FlowAsset.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class FLOW_API UFlowAsset : public UObject
#endif

public:
void AddInstance(UFlowAsset* NewInstance);
void AddInstance(UFlowAsset* Instance);
int32 RemoveInstance(UFlowAsset* Instance);

void ClearInstances();
Expand Down

0 comments on commit 6013d68

Please sign in to comment.