From a2ffdd30f501fa6e8a1e53e4ea244a5417aa313f Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 23 Mar 2019 12:02:21 -0400 Subject: [PATCH] Misc cleanup to avoid unnecessary conversions. --- DepotDownloader/ContentDownloader.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index c2d171c2..f8aaca7b 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -125,10 +125,10 @@ namespace DepotDownloader SteamApps.PICSProductInfoCallback.PICSProductInfo package; if ( steam3.PackageInfo.TryGetValue( license, out package ) && package != null ) { - if ( package.KeyValues[ "appids" ].Children.Any( child => child.AsInteger() == depotId ) ) + if ( package.KeyValues[ "appids" ].Children.Any( child => child.AsUnsignedInteger() == depotId ) ) return true; - if ( package.KeyValues[ "depotids" ].Children.Any( child => child.AsInteger() == depotId ) ) + if ( package.KeyValues[ "depotids" ].Children.Any( child => child.AsUnsignedInteger() == depotId ) ) return true; } } @@ -208,7 +208,7 @@ namespace DepotDownloader // Rather than relay on the unknown sharedinstall key, just look for manifests. Test cases: 111710, 346680. if ( depotChild[ "manifests" ] == KeyValue.Invalid && depotChild[ "depotfromapp" ] != KeyValue.Invalid ) { - uint otherAppId = ( uint )depotChild[ "depotfromapp" ].AsInteger(); + uint otherAppId = depotChild["depotfromapp"].AsUnsignedInteger(); if ( otherAppId == appId ) { // This shouldn't ever happen, but ya never know with Valve. Don't infinite loop.