From 943f242e4e523e2fea6df95dcbcd8e6e434ddb75 Mon Sep 17 00:00:00 2001 From: Ben C Date: Tue, 18 Oct 2022 14:01:36 -0400 Subject: [PATCH] Remove Some Redundant Code --- NewHorizons/NewHorizonsApi.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NewHorizons/NewHorizonsApi.cs b/NewHorizons/NewHorizonsApi.cs index 86570294..1ea6b869 100644 --- a/NewHorizons/NewHorizonsApi.cs +++ b/NewHorizons/NewHorizonsApi.cs @@ -134,9 +134,8 @@ namespace NewHorizons var data = QueryBody(typeof(T), bodyName, jsonPath); if (data is T result) { return result; - } else { - return default(T); } + return default; } public object QuerySystem(Type outType, string jsonPath) @@ -151,9 +150,8 @@ namespace NewHorizons var data = QuerySystem(typeof(T), jsonPath); if (data is T result) { return result; - } else { - return default(T); } + return default; } public GameObject SpawnObject(GameObject planet, Sector sector, string propToCopyPath, Vector3 position, Vector3 eulerAngles,