Skip to content

Commit a7e3602

Browse files
committed
Fix: CI errors
1 parent 7bac928 commit a7e3602

6 files changed

Lines changed: 21 additions & 18 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282

8383
yamllint:
8484
name: yamllint
85-
runs-on: ubuntu-20.04
85+
runs-on: ubuntu-latest
8686
steps:
8787
- name: Checkout repo
8888
uses: actions/checkout@v2
@@ -100,7 +100,7 @@ jobs:
100100

101101
shellcheck:
102102
name: shellcheck
103-
runs-on: ubuntu-20.04
103+
runs-on: ubuntu-latest
104104
steps:
105105
- name: Checkout repo
106106
uses: actions/checkout@v2

Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ class FCollectFromKdtreeBoxAction : public FPendingLatentAction
195195
FLatentActionInfo LatentInfo;
196196
FAsyncTask<FCollectFromKdtreeBoxTask>* Task;
197197

198-
FCollectFromKdtreeBoxAction(const FLatentActionInfo& InLatentInfo, const FKdtree* Tree, const FBox Box,
199-
TArray<int>* Indices, TArray<FVector>* Data)
198+
FCollectFromKdtreeBoxAction(
199+
const FLatentActionInfo& InLatentInfo, const FKdtree* Tree, const FBox Box, TArray<int>* Indices, TArray<FVector>* Data)
200200
: LatentInfo(InLatentInfo), Task(nullptr)
201201
{
202202
FCollectFromKdtreeBoxTaskParams Params;

Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ void UKdtreeBPLibrary::CollectFromKdtree(
3636
}
3737
}
3838

39-
void UKdtreeBPLibrary::CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices,
40-
TArray<FVector>& Data)
39+
void UKdtreeBPLibrary::CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data)
4140
{
4241
KdtreeInternal::CollectFromKdtree(Tree.Internal, Box, &Indices);
4342
for (int Index = 0; Index < Indices.Num(); ++Index)

Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ void QuickSelect(T* First, T* Nth, T* Last, TFunctionRef<int(T, T)> Comparator)
3434

3535
while (Left <= Right)
3636
{
37-
while (Left <= Right && Comparator(*Left, *Pivot) == 1) Left++;
38-
while (Left <= Right && Comparator(*Right, *Pivot) == -1) Right--;
37+
while (Left <= Right && Comparator(*Left, *Pivot) == 1)
38+
{
39+
Left++;
40+
}
41+
while (Left <= Right && Comparator(*Right, *Pivot) == -1)
42+
{
43+
Right--;
44+
}
3945
if (Left <= Right)
4046
{
4147
Swap(Left, Right);
@@ -235,8 +241,7 @@ void CollectFromKdtree(
235241
}
236242
}
237243

238-
void CollectFromKdtree(
239-
const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FBox& Box, TArray<int>* Result)
244+
void CollectFromKdtree(const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FBox& Box, TArray<int>* Result)
240245
{
241246
if (Node == nullptr)
242247
{
@@ -259,7 +264,7 @@ void CollectFromKdtree(
259264
CollectFromKdtree(Tree, Node->ChildRight, Box, Result);
260265
}
261266
}
262-
} // namespace
267+
} // namespace
263268

264269
void BuildKdtree(FKdtreeInternal* Tree, const TArray<FVector>& Data)
265270
{

Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class KDTREE_API UAsyncKdtreeBPLibrary : public UBlueprintFunctionLibrary
3737
TArray<int>& Indices, TArray<FVector>& Data, FLatentActionInfo LatentInfo);
3838

3939
UFUNCTION(BlueprintCallable,
40-
meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject",
41-
DefaultToSelf = "WorldContextObject"),
42-
Category = "SpacialDataStructure|kd-tree", DisplayName= "Collect From Kdtree Async (Box)")
40+
meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject",
41+
DefaultToSelf = "WorldContextObject"),
42+
Category = "SpacialDataStructure|kd-tree", DisplayName= "Collect From Kdtree Async (Box)")
4343
static void CollectFromKdtreeAsyncBox(const UObject* WorldContextObject, const FKdtree& Tree, const FBox Box,
4444
TArray<int>& Indices, TArray<FVector>& Data, FLatentActionInfo LatentInfo);
4545
};

Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ class KDTREE_API UKdtreeBPLibrary : public UBlueprintFunctionLibrary
2828
UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree")
2929
static void ClearKdtree(UPARAM(ref) FKdtree& Tree);
3030

31-
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Sphere)")
31+
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree (Sphere)")
3232
static void CollectFromKdtree(
3333
const FKdtree& Tree, const FVector Center, float Radius, TArray<int>& Indices, TArray<FVector>& Data);
3434

35-
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Box)")
36-
static void CollectFromKdtreeBox(
37-
const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data);
35+
UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree (Box)")
36+
static void CollectFromKdtreeBox(const FKdtree& Tree, const FBox Box, TArray<int>& Indices, TArray<FVector>& Data);
3837

3938
UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree")
4039
static void ValidateKdtree(const FKdtree& Tree);

0 commit comments

Comments
 (0)