Skip to content

Commit 56b236b

Browse files
authored
Merge pull request #83 from OpenDroneMap/housekeeping
Housekeeping
2 parents 96e9af2 + dcf3fff commit 56b236b

30 files changed

+124
-135
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v5
1414
- name: Setup .NET
15-
uses: actions/setup-dotnet@v2
15+
uses: actions/setup-dotnet@v4
1616
with:
17-
dotnet-version: 8.0.x
17+
dotnet-version: 9.0.x
1818
- name: Restore dependencies
1919
run: dotnet restore
2020
- name: Build

.github/workflows/publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v5
1313
- name: Setup .NET
14-
uses: actions/setup-dotnet@v2
14+
uses: actions/setup-dotnet@v4
1515
with:
16-
dotnet-version: 8.0.x
16+
dotnet-version: 9.0.x
1717

1818
- name: Build
1919
run: echo ${{ github.sha }} > Release.txt
@@ -32,15 +32,15 @@ jobs:
3232
run: dotnet publish -p:PublishProfile=osx-x64.pubxml Obj2Tiles
3333

3434
- name: Zip win-x64
35-
run: cd Obj2Tiles/bin/Release/net8.0/publish/win-x64/ && zip -r ../../../../../../Obj2Tiles-Win64.zip *
35+
run: cd Obj2Tiles/bin/Release/net9.0/publish/win-x64/ && zip -r ../../../../../../Obj2Tiles-Win64.zip *
3636
- name: Zip win-arm64
37-
run: cd Obj2Tiles/bin/Release/net8.0/publish/win-arm64/ && zip -r ../../../../../../Obj2Tiles-WinArm64.zip *
37+
run: cd Obj2Tiles/bin/Release/net9.0/publish/win-arm64/ && zip -r ../../../../../../Obj2Tiles-WinArm64.zip *
3838
- name: Zip linux-x64
39-
run: cd Obj2Tiles/bin/Release/net8.0/publish/linux-x64/ && zip -r ../../../../../../Obj2Tiles-Linux64.zip *
39+
run: cd Obj2Tiles/bin/Release/net9.0/publish/linux-x64/ && zip -r ../../../../../../Obj2Tiles-Linux64.zip *
4040
- name: Zip linux-arm64
41-
run: cd Obj2Tiles/bin/Release/net8.0/publish/linux-arm64/ && zip -r ../../../../../../Obj2Tiles-LinuxArm64.zip *
41+
run: cd Obj2Tiles/bin/Release/net9.0/publish/linux-arm64/ && zip -r ../../../../../../Obj2Tiles-LinuxArm64.zip *
4242
- name: Zip osx-x64
43-
run: cd Obj2Tiles/bin/Release/net8.0/publish/osx-x64/ && zip -r ../../../../../../Obj2Tiles-Osx64.zip *
43+
run: cd Obj2Tiles/bin/Release/net9.0/publish/osx-x64/ && zip -r ../../../../../../Obj2Tiles-Osx64.zip *
4444

4545
- name: Release
4646
uses: softprops/action-gh-release@v1

MeshDecimatorCore/Algorithms/FastQuadricMeshSimplification.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ public override Mesh ToMesh()
14141414
else
14151415
{
14161416
// This mesh doesn't have any triangles left
1417-
indices[subMeshIndex] = new int[0];
1417+
indices[subMeshIndex] = [];
14181418
}
14191419
}
14201420

MeshDecimatorCore/Collections/ResizableArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal sealed class ResizableArray<T>
3636
private T[] items = null;
3737
private int length = 0;
3838

39-
private static T[] emptyArr = new T[0];
39+
private static T[] emptyArr = [];
4040
#endregion
4141

4242
#region Properties

MeshDecimatorCore/Mesh.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public sealed class Mesh
5151
private Vector4[] colors = null;
5252
private BoneWeight[] boneWeights = null;
5353

54-
private static readonly int[] emptyIndices = new int[0];
54+
private static readonly int[] emptyIndices = [];
5555
#endregion
5656

5757
#region Properties

MeshDecimatorCore/MeshDecimatorCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

Obj2Gltf/Obj2Gltf.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Configurations>Source;Debug;Release</Configurations>
1212
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1313
<IsPackable>true</IsPackable>
14-
<TargetFramework>net8.0</TargetFramework>
14+
<TargetFramework>net9.0</TargetFramework>
1515
<LangVersion>10</LangVersion>
1616
</PropertyGroup>
1717

Obj2Tiles.Common/CommonUtils.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public static bool FilesAreEqual(FileInfo first, FileInfo second)
5252

5353
for (var i = 0; i < iterations; i++)
5454
{
55-
fs1.Read(one, 0, BytesToRead);
56-
fs2.Read(two, 0, BytesToRead);
55+
fs1.ReadExactly(one, 0, BytesToRead);
56+
fs2.ReadExactly(two, 0, BytesToRead);
5757

5858
if (BitConverter.ToInt64(one, 0) != BitConverter.ToInt64(two, 0))
5959
return false;
@@ -317,16 +317,16 @@ public static string[] SafeTreeDelete(string baseTempFolder, int rounds = 3, int
317317
}
318318

319319
if (!entries.Any())
320-
return Array.Empty<string>();
320+
return [];
321321

322322
Thread.Sleep(delay);
323323
}
324324

325325
return entries.ToArray();
326326
}
327327

328-
private static readonly HashSet<string> _compressibleMimeTypes = new()
329-
{
328+
private static readonly HashSet<string> _compressibleMimeTypes =
329+
[
330330
"text/html",
331331
"text/css",
332332
"text/plain",
@@ -358,7 +358,7 @@ public static string[] SafeTreeDelete(string baseTempFolder, int rounds = 3, int
358358
"font/eot",
359359
"font/otf",
360360
"font/opentype"
361-
};
361+
];
362362

363363

364364
// Credit https://stackoverflow.com/a/11124118

Obj2Tiles.Common/HttpHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
public static class HttpHelper
44
{
5-
private static readonly HttpClient _httpClient = new HttpClient();
5+
private static readonly HttpClient HttpClient = new();
66

77
public static async Task DownloadFileAsync(string uri, string outputPath)
88
{
99
if (!Uri.TryCreate(uri, UriKind.Absolute, out _))
1010
throw new InvalidOperationException("URI is invalid.");
1111

12-
var fileBytes = await _httpClient.GetByteArrayAsync(uri);
12+
var fileBytes = await HttpClient.GetByteArrayAsync(uri);
1313
await File.WriteAllBytesAsync(outputPath, fileBytes);
1414
}
1515
}

Obj2Tiles.Common/Obj2Tiles.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)