Skip to content

Commit

Permalink
const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
MothDoctor committed Sep 2, 2021
1 parent a3e54ee commit f07ec26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/Flow/Private/FlowComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(ActorTag))
for (const TWeakObjectPtr<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(ActorTag))
{
Component->ReceiveNotify.Broadcast(this, NotifyTag);
}
Expand All @@ -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<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(Notify.ActorTag))
for (const TWeakObjectPtr<UFlowComponent>& Component : FlowSubsystem->GetComponents<UFlowComponent>(Notify.ActorTag))
{
Component->ReceiveNotify.Broadcast(this, Notify.NotifyTag);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f07ec26

Please sign in to comment.