Compiler.cs contained method GetCompilerOutput which, apparently,

was not used, but exactly the same path was calculated inline.
This patch does some minor refactoring by replacing inline path
calculation with GetCompilerOutput. This doesn't actually affect anything,
just minor prettifying of the code
slimupdates
unknown 2010-04-24 18:52:23 +03:00 committed by AlexRa
parent 8b75302a1e
commit aa56953411
1 changed files with 7 additions and 4 deletions

View File

@ -261,13 +261,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
// } // }
//} //}
public object GetCompilerOutput(UUID assetID) public string GetCompilerOutput(string assetID)
{ {
return Path.Combine(ScriptEnginesPath, Path.Combine( return Path.Combine(ScriptEnginesPath, Path.Combine(
m_scriptEngine.World.RegionInfo.RegionID.ToString(), m_scriptEngine.World.RegionInfo.RegionID.ToString(),
FilePrefix + "_compiled_" + assetID + ".dll")); FilePrefix + "_compiled_" + assetID + ".dll"));
} }
public string GetCompilerOutput(UUID assetID)
{
return GetCompilerOutput(assetID.ToString());
}
/// <summary> /// <summary>
/// Converts script from LSL to CS and calls CompileFromCSText /// Converts script from LSL to CS and calls CompileFromCSText
/// </summary> /// </summary>
@ -279,9 +284,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
linemap = null; linemap = null;
m_warnings.Clear(); m_warnings.Clear();
assembly = Path.Combine(ScriptEnginesPath, Path.Combine( assembly = GetCompilerOutput(asset);
m_scriptEngine.World.RegionInfo.RegionID.ToString(),
FilePrefix + "_compiled_" + asset + ".dll"));
if (!Directory.Exists(ScriptEnginesPath)) if (!Directory.Exists(ScriptEnginesPath))
{ {