Skip to content

Commit

Permalink
static analysis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MothDoctor committed Aug 15, 2024
1 parent 31a51fb commit b9da31f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
17 changes: 4 additions & 13 deletions Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

#include "Graph/FlowGraphEditor.h"

#include "FlowEditorCommands.h"
#include "FlowEditorModule.h"

#include "Asset/FlowAssetEditor.h"
#include "Asset/FlowDebuggerSubsystem.h"
#include "FlowEditorCommands.h"
#include "Graph/FlowGraphEditorSettings.h"
#include "Graph/FlowGraphSchema_Actions.h"
#include "Graph/Nodes/FlowGraphNode.h"
#include "Nodes/Route/FlowNode_SubGraph.h"

#include "EdGraphUtilities.h"
#include "Framework/Application/SlateApplication.h"
#include "Framework/Commands/GenericCommands.h"
#include "GraphEditorActions.h"
#include "HAL/PlatformApplicationMisc.h"
#include "IDetailsView.h"
#include "LevelEditor.h"
Expand Down Expand Up @@ -644,23 +644,18 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location)
FlowGraph->LockUpdates();

UFlowGraphNode* SelectedParent = nullptr;
bool bHasMultipleNodesSelected = false;

const FGraphPanelSelectionSet SelectedNodes = GetSelectedNodes();
for (FGraphPanelSelectionSet::TConstIterator SelectedIter(SelectedNodes); SelectedIter; ++SelectedIter)
{
UFlowGraphNode* Node = Cast<UFlowGraphNode>(*SelectedIter);

if (Node)
if (UFlowGraphNode* Node = Cast<UFlowGraphNode>(*SelectedIter))
{
if (SelectedParent == nullptr)
{
SelectedParent = Node;
}
else
{
bHasMultipleNodesSelected = true;

break;
}
}
Expand Down Expand Up @@ -703,8 +698,6 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location)
AvgNodePosition.Y *= InvNumNodes;
}

bool bPastedParentNode = false;

TMap<int32, UFlowGraphNode*> EdNodeCopyIndexMap;
for (TSet<UEdGraphNode*>::TIterator It(PastedNodes); It; ++It)
{
Expand All @@ -715,8 +708,6 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location)

if (PasteNode && (PasteFlowGraphNode == nullptr || !PasteFlowGraphNode->IsSubNode()))
{
bPastedParentNode = true;

// Select the newly pasted stuff
constexpr bool bSelectNodes = true;
SetNodeSelection(PasteNode, bSelectNodes);
Expand Down
3 changes: 0 additions & 3 deletions Source/FlowEditor/Public/Graph/FlowGraphEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

#pragma once

#include "EdGraphUtilities.h"
#include "GraphEditor.h"
#include "GraphEditorActions.h"
#include "SGraphNode.h"
#include "Widgets/DeclarativeSyntaxSupport.h"

#include "FlowGraph.h"
Expand Down

0 comments on commit b9da31f

Please sign in to comment.