From f07ec269ce8d8349986791eda3bacfbf0fe15a0f Mon Sep 17 00:00:00 2001 From: Moth Doctor Date: Fri, 3 Sep 2021 00:50:39 +0200 Subject: [PATCH] const correctness --- Source/Flow/Private/FlowComponent.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Flow/Private/FlowComponent.cpp b/Source/Flow/Private/FlowComponent.cpp index 81370793..fabcfd9a 100644 --- a/Source/Flow/Private/FlowComponent.cpp +++ b/Source/Flow/Private/FlowComponent.cpp @@ -290,9 +290,9 @@ void UFlowComponent::NotifyActor(const FGameplayTag ActorTag, const FGameplayTag { if (IsFlowNetMode(NetMode) && NotifyTag.IsValid() && HasBegunPlay()) { - if (UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) + if (const UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) { - for (TWeakObjectPtr& Component : FlowSubsystem->GetComponents(ActorTag)) + for (const TWeakObjectPtr& Component : FlowSubsystem->GetComponents(ActorTag)) { Component->ReceiveNotify.Broadcast(this, NotifyTag); } @@ -308,11 +308,11 @@ void UFlowComponent::NotifyActor(const FGameplayTag ActorTag, const FGameplayTag void UFlowComponent::OnRep_NotifyTagsFromAnotherComponent() { - if (UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) + if (const UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) { for (const FNotifyTagReplication& Notify : NotifyTagsFromAnotherComponent) { - for (TWeakObjectPtr& Component : FlowSubsystem->GetComponents(Notify.ActorTag)) + for (const TWeakObjectPtr& Component : FlowSubsystem->GetComponents(Notify.ActorTag)) { Component->ReceiveNotify.Broadcast(this, Notify.NotifyTag); } @@ -341,7 +341,7 @@ void UFlowComponent::FinishRootFlow(const EFlowFinishPolicy FinishPolicy) UFlowAsset* UFlowComponent::GetRootFlowInstance() { - if (UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) + if (const UFlowSubsystem* FlowSubsystem = GetFlowSubsystem()) { return FlowSubsystem->GetRootFlow(this); }