From 072cd2824a799a318c9fadae93c25f8ab6b39a01 Mon Sep 17 00:00:00 2001
From: Evan Husted <gr33m11@gmail.com>
Date: Sun, 8 Dec 2024 13:05:35 -0600
Subject: [PATCH] misc: chore: Simplify Updater version parsing.

---
 src/Ryujinx/Updater.cs | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/Ryujinx/Updater.cs b/src/Ryujinx/Updater.cs
index 6a1701208..e240ad141 100644
--- a/src/Ryujinx/Updater.cs
+++ b/src/Ryujinx/Updater.cs
@@ -74,14 +74,7 @@ namespace Ryujinx.Ava
                 _platformExt = $"linux_{arch}.tar.gz";
             }
 
-            Version newVersion;
-            Version currentVersion;
-
-            try
-            {
-                currentVersion = Version.Parse(Program.Version);
-            }
-            catch
+            if (!Version.TryParse(Program.Version, out Version currentVersion))
             {
                 Logger.Error?.Print(LogClass.Application, $"Failed to convert the current {App.FullAppName} version!");
 
@@ -164,11 +157,7 @@ namespace Ryujinx.Ava
                 return;
             }
 
-            try
-            {
-                newVersion = Version.Parse(_buildVer);
-            }
-            catch
+            if (!Version.TryParse(_buildVer, out Version newVersion))
             {
                 Logger.Error?.Print(LogClass.Application, $"Failed to convert the received {App.FullAppName} version from GitHub!");