* Breaking all the code, breaking all the code..!

* Made a bunch more members static, removed some dead code, general cleaning.
This commit is contained in:
Adam Frisby
2008-05-01 16:23:53 +00:00
parent 5231903778
commit 01f31fd933
27 changed files with 61 additions and 72 deletions

View File

@@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
private int CalculateNumPackets(byte[] data)
private static int CalculateNumPackets(byte[] data)
{
const uint m_maxPacketSize = 600;
int numPackets = 1;

View File

@@ -241,7 +241,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="path"></param>
/// <param name="fileDescription"></param>
/// <param name="action"></param>
private void LoadFromFile(string path, string fileDescription, ConfigAction action)
private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
{
if (File.Exists(path))
{

View File

@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// </summary>
/// <returns></returns>
protected LLSDMapLayer GetLLSDMapLayerResponse()
protected static LLSDMapLayer GetLLSDMapLayerResponse()
{
LLSDMapLayer mapLayer = new LLSDMapLayer();
mapLayer.Right = 5000;
@@ -758,7 +758,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close();
// fs.Close();
//}
private void SaveAssetToFile(string filename, byte[] data)
private static void SaveAssetToFile(string filename, byte[] data)
{
string assetPath = "UserAssets";
if (!Directory.Exists(assetPath))
@@ -840,7 +840,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close();
// fs.Close();
//}
private void SaveAssetToFile(string filename, byte[] data)
private static void SaveAssetToFile(string filename, byte[] data)
{
string assetPath = "UserAssets";
if (!Directory.Exists(assetPath))
@@ -945,7 +945,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close();
// fs.Close();
//}
private void SaveAssetToFile(string filename, byte[] data)
private static void SaveAssetToFile(string filename, byte[] data)
{
string assetPath = "UserAssets";
if (!Directory.Exists(assetPath))

View File

@@ -496,7 +496,7 @@ namespace OpenSim.Framework.Communications
return llsdBack;
}
private LLSDArray WrapLLSDMap(LLSDMap wrapMe)
private static LLSDArray WrapLLSDMap(LLSDMap wrapMe)
{
LLSDArray array = new LLSDArray();
array.Add(wrapMe);

View File

@@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications
return m_welcomeMessage;
}
private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
private static LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
{
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
foreach (FriendListItem fl in LFL)

View File

@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications
/// </summary>
/// <param name="s">string to be examined</param>
/// <returns>true if slash is present</returns>
private bool isSlashed(string s)
private static bool isSlashed(string s)
{
return s.Substring(s.Length - 1, 1) == "/";
}
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications
sb.Append("&");
sb.Append(kv.Key);
if (kv.Value != null && kv.Value.Length != 0)
if (!string.IsNullOrEmpty(kv.Value))
{
sb.Append("=");
sb.Append(kv.Value);