Refactor part II

melanie
Melanie Thielker 2017-02-01 16:34:07 +00:00
parent a5151bb337
commit 60cf3f759f
1 changed files with 4 additions and 9 deletions

View File

@ -218,9 +218,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null) if (m_Cache != null)
{ {
bool negative; if (!m_Cache.Get(id, out asset))
asset = m_Cache.Get(id, out negative);
if (negative)
return null; return null;
} }
@ -244,10 +242,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null) if (m_Cache != null)
{ {
bool negative; AssetBase asset;
AssetBase asset = m_Cache.Get(id, out negative); if (!m_Cache.Get(id, out asset))
if (negative)
return false; return false;
if (asset != null) if (asset != null)
@ -302,9 +298,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
public bool UpdateContent(string id, byte[] data) public bool UpdateContent(string id, byte[] data)
{ {
AssetBase asset = null; AssetBase asset = null;
bool negative;
if (m_Cache != null) if (m_Cache != null)
m_Cache.Get(id, out negative); m_Cache.Get(id, out asset);
if (asset != null) if (asset != null)
{ {
asset.Data = data; asset.Data = data;