mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Refactor asset handling as per Ubit's suggestion
This commit is contained in:
@@ -47,8 +47,9 @@ namespace OpenSim.Framework
|
||||
/// Get an asset by its id.
|
||||
/// </summary>
|
||||
/// <param name='id'></param>
|
||||
/// <returns>null if the asset does not exist.</returns>
|
||||
AssetBase Get(string id, out bool negative);
|
||||
/// <param name='asset'>Will be set to null if no asset was found</param>
|
||||
/// <returns>False if the asset has been negative-cached</returns>
|
||||
bool Get(string id, out AssetBase asset);
|
||||
|
||||
/// <summary>
|
||||
/// Check whether an asset with the specified id exists in the cache.
|
||||
|
||||
@@ -113,8 +113,8 @@ namespace OpenSim.Framework
|
||||
{
|
||||
if (dataCache.Check(item.TextureID.ToString()))
|
||||
{
|
||||
bool negative;
|
||||
AssetBase assetItem = dataCache.Get(item.TextureID.ToString(), out negative);
|
||||
AssetBase assetItem;
|
||||
dataCache.Get(item.TextureID.ToString(), out assetItem);
|
||||
if (assetItem != null)
|
||||
{
|
||||
itemmap.Add("assetdata", OSD.FromBinary(assetItem.Data));
|
||||
|
||||
Reference in New Issue
Block a user