From 573b5760e991a29107e9cb43c5d1e489252cd5be Mon Sep 17 00:00:00 2001 From: Mavicus Date: Tue, 14 Jun 2016 10:13:47 +0800 Subject: [PATCH] Update GPGSUpgrader.cs Use string safe comparison !string1.Equals(string2) instead of string1 != string2 to prevent compiler warnings about unreachable code. --- .../Assets/GooglePlayGames/Editor/GPGSUpgrader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUpgrader.cs b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUpgrader.cs index 01760636d..065a8cde8 100644 --- a/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUpgrader.cs +++ b/source/PluginDev/Assets/GooglePlayGames/Editor/GPGSUpgrader.cs @@ -33,10 +33,10 @@ public class GPGSUpgrader static GPGSUpgrader() { string prevVer = GPGSProjectSettings.Instance.Get(GPGSUtil.LASTUPGRADEKEY, "00000"); - if (prevVer != PluginVersion.VersionKey) + if (!prevVer.Equals (PluginVersion.VersionKey)) { // if this is a really old version, upgrade to 911 first, then 915 - if (prevVer != PluginVersion.VersionKeyCPP) + if (!prevVer.Equals (PluginVersion.VersionKeyCPP)) { prevVer = Upgrade911(prevVer); } @@ -53,7 +53,7 @@ static GPGSUpgrader() prevVer = Upgrade931(prevVer); // there is no migration needed to 930+ - if (prevVer != PluginVersion.VersionKey) { + if (!prevVer.Equals (PluginVersion.VersionKey)) { Debug.Log("Upgrading from format version " + prevVer + " to " + PluginVersion.VersionKey); prevVer = PluginVersion.VersionKey; } @@ -191,7 +191,7 @@ private static string Upgrade930(string prevVer) }; // only delete these if we are not version 0.9.34 - if (PluginVersion.VersionKey != PluginVersion.VersionKeyJNIStats) { + if (!PluginVersion.VersionKey.Equals (PluginVersion.VersionKeyJNIStats)) { foreach (string file in obsoleteFiles) { if (File.Exists(file))