From e9c8584656e2367e889182eedfc6428256d16e1b Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 23 May 2022 19:56:13 +0200 Subject: [PATCH] Format code in Flax.Build --- Source/Tools/Flax.Build/Bindings/ModuleInfo.cs | 2 +- Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs | 3 +-- Source/Tools/Flax.Build/Deploy/Deployment.Utils.cs | 2 +- .../Tools/Flax.Build/Platforms/Mac/MacToolchain.cs | 2 +- .../Platforms/Windows/WindowsToolchainBase.cs | 12 +++--------- .../Flax.Build/Projects/XCodeProjectGenerator.cs | 4 ++-- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Source/Tools/Flax.Build/Bindings/ModuleInfo.cs b/Source/Tools/Flax.Build/Bindings/ModuleInfo.cs index fb3d93835..d6cd813c4 100644 --- a/Source/Tools/Flax.Build/Bindings/ModuleInfo.cs +++ b/Source/Tools/Flax.Build/Bindings/ModuleInfo.cs @@ -49,7 +49,7 @@ namespace Flax.Build.Bindings reader.ReadBoolean() != Module.BuildCSharp || reader.ReadString() != Globals.Project.Name || reader.ReadString() != Globals.Project.Version.ToString() - ) + ) throw new Exception(); base.Read(reader); diff --git a/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs b/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs index ca6bcb6c5..ad94da918 100644 --- a/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs +++ b/Source/Tools/Flax.Build/Deploy/Deployment.Editor.cs @@ -70,8 +70,7 @@ namespace Flax.Deploy case TargetPlatform.Mac: DeployFolder(RootPath, OutputPath, "Source/Platforms/Editor/Mac/Mono"); break; - default: - throw new InvalidPlatformException(Platform.BuildTargetPlatform); + default: throw new InvalidPlatformException(Platform.BuildTargetPlatform); } // Deploy DotNet deps diff --git a/Source/Tools/Flax.Build/Deploy/Deployment.Utils.cs b/Source/Tools/Flax.Build/Deploy/Deployment.Utils.cs index f6d7c9aa4..ede7a0a7a 100644 --- a/Source/Tools/Flax.Build/Deploy/Deployment.Utils.cs +++ b/Source/Tools/Flax.Build/Deploy/Deployment.Utils.cs @@ -31,7 +31,7 @@ namespace Flax.Deploy var dst = Path.GetDirectoryName(dstPath); if (!Directory.Exists(dst)) Directory.CreateDirectory(dst); - + if (!File.Exists(srcPath)) { if (optional) diff --git a/Source/Tools/Flax.Build/Platforms/Mac/MacToolchain.cs b/Source/Tools/Flax.Build/Platforms/Mac/MacToolchain.cs index 77f24782c..5c934ad0d 100644 --- a/Source/Tools/Flax.Build/Platforms/Mac/MacToolchain.cs +++ b/Source/Tools/Flax.Build/Platforms/Mac/MacToolchain.cs @@ -271,7 +271,7 @@ namespace Flax.Build.Platforms // Input libraries var libraryPaths = new HashSet(); - var dylibs = new HashSet(); + var dylibs = new HashSet(); foreach (var library in linkEnvironment.InputLibraries) { var dir = Path.GetDirectoryName(library); diff --git a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs index c3ff87138..d8ba9cbdc 100644 --- a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs +++ b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs @@ -376,10 +376,8 @@ namespace Flax.Build.Platforms { case WindowsPlatformToolset.v143: case WindowsPlatformToolset.v142: - case WindowsPlatformToolset.v141: - return Path.Combine(vcToolChainDir, "lib", "x86", "store", "references"); - case WindowsPlatformToolset.v140: - return Path.Combine(vcToolChainDir, "lib", "store", "references"); + case WindowsPlatformToolset.v141: return Path.Combine(vcToolChainDir, "lib", "x86", "store", "references"); + case WindowsPlatformToolset.v140: return Path.Combine(vcToolChainDir, "lib", "store", "references"); default: return null; } } @@ -906,11 +904,7 @@ namespace Flax.Build.Platforms // Create AppxManifest file { using (var stringWriter = new StringWriterWithEncoding(Encoding.UTF8)) - using (var xmlTextWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings - { - Encoding = Encoding.UTF8, - Indent = true, - })) + using (var xmlTextWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings { Encoding = Encoding.UTF8, Indent = true, })) { xmlTextWriter.WriteStartDocument(); diff --git a/Source/Tools/Flax.Build/Projects/XCodeProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/XCodeProjectGenerator.cs index 106f0611d..fdb9b4012 100644 --- a/Source/Tools/Flax.Build/Projects/XCodeProjectGenerator.cs +++ b/Source/Tools/Flax.Build/Projects/XCodeProjectGenerator.cs @@ -120,7 +120,7 @@ namespace Flax.Build.Projects contents.AppendLine("\t\t\tattributes = {"); contents.AppendLine("\t\t\t\tBuildIndependentTargetsInParallel = 1;"); contents.AppendLine("\t\t\t\tLastUpgradeCheck = 1320;"); - contents.AppendLine("\t\t\t\tTargetAttributes = {"); + contents.AppendLine("\t\t\t\tTargetAttributes = {"); contents.AppendLine("\t\t\t\t\t" + targetId + " = {"); contents.AppendLine("\t\t\t\t\t\tCreatedOnToolsVersion = 13.2.1;"); contents.AppendLine("\t\t\t\t\t};"); @@ -134,7 +134,7 @@ namespace Flax.Build.Projects contents.AppendLine("\t\t\t\ten,"); contents.AppendLine("\t\t\t\tBase,"); contents.AppendLine("\t\t\t);"); - contents.AppendLine("\t\t\tmainGroup = " + groupId+ ";"); + contents.AppendLine("\t\t\tmainGroup = " + groupId + ";"); contents.AppendLine("\t\t\tprojectDirPath = \"\";"); contents.AppendLine("\t\t\tprojectRoot = \"\";"); contents.AppendLine("\t\t\ttargets = (");