Misc cleanup to avoid unnecessary conversions.

This commit is contained in:
Nicholas Hastings committed 2019-03-23 12:02:21 -04:00
1 parent 72f633eade
commit a2ffdd30f5
1 file changed
+3 -3
+3 -3
View File
@@ -125,10 +125,10 @@ namespace DepotDownloader
SteamApps.PICSProductInfoCallback.PICSProductInfo package; SteamApps.PICSProductInfoCallback.PICSProductInfo package;
if ( steam3.PackageInfo.TryGetValue( license, out package ) && package != null ) 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; return true;
if ( package.KeyValues[ "depotids" ].Children.Any( child => child.AsInteger() == depotId ) ) if ( package.KeyValues[ "depotids" ].Children.Any( child => child.AsUnsignedInteger() == depotId ) )
return true; return true;
} }
} }
@@ -208,7 +208,7 @@ namespace DepotDownloader
// Rather than relay on the unknown sharedinstall key, just look for manifests. Test cases: 111710, 346680. // 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 ) if ( depotChild[ "manifests" ] == KeyValue.Invalid && depotChild[ "depotfromapp" ] != KeyValue.Invalid )
{ {
uint otherAppId = ( uint )depotChild[ "depotfromapp" ].AsInteger(); uint otherAppId = depotChild["depotfromapp"].AsUnsignedInteger();
if ( otherAppId == appId ) if ( otherAppId == appId )
{ {
// This shouldn't ever happen, but ya never know with Valve. Don't infinite loop. // This shouldn't ever happen, but ya never know with Valve. Don't infinite loop.