elminate unnecessary asset != null check in FlotsamAssetCache.UpdateFileCache()

Passed in asset is always not null
master-beforevarregion
Justin Clark-Casey (justincc) 2014-01-18 00:06:12 +00:00
parent b52b50ee56
commit 12bfce7b9f
1 changed files with 51 additions and 54 deletions

View File

@ -247,9 +247,6 @@ namespace OpenSim.Region.CoreModules.Asset
} }
private void UpdateFileCache(string key, AssetBase asset) private void UpdateFileCache(string key, AssetBase asset)
{
// TODO: Spawn this off to some seperate thread to do the actual writing
if (asset != null)
{ {
string filename = GetFileName(key); string filename = GetFileName(key);
@ -272,8 +269,9 @@ namespace OpenSim.Region.CoreModules.Asset
catch catch
{ {
} }
} else { }
else
{
// Once we start writing, make sure we flag that we're writing // Once we start writing, make sure we flag that we're writing
// that object to the cache so that we don't try to write the // that object to the cache so that we don't try to write the
// same file multiple times. // same file multiple times.
@ -313,7 +311,6 @@ namespace OpenSim.Region.CoreModules.Asset
asset.ID, e.Message, e.StackTrace); asset.ID, e.Message, e.StackTrace);
} }
} }
}
public void Cache(AssetBase asset) public void Cache(AssetBase asset)
{ {