From 01f31fd933bbaec246d2fef5756b7d83be7980e0 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 16:23:53 +0000 Subject: * Breaking all the code, breaking all the code..! * Made a bunch more members static, removed some dead code, general cleaning. --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 2 +- OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 2 +- OpenSim/Framework/Communications/Capabilities/Caps.cs | 8 ++++---- OpenSim/Framework/Communications/LoginResponse.cs | 2 +- OpenSim/Framework/Communications/LoginService.cs | 2 +- OpenSim/Framework/Communications/RestClient.cs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index c81ea35..69e0437 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache /// /// /// - private int CalculateNumPackets(byte[] data) + private static int CalculateNumPackets(byte[] data) { const uint m_maxPacketSize = 600; int numPackets = 1; diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index a39738d..b3852c0 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs @@ -241,7 +241,7 @@ namespace OpenSim.Framework.Communications.Cache /// /// /// - private void LoadFromFile(string path, string fileDescription, ConfigAction action) + private static void LoadFromFile(string path, string fileDescription, ConfigAction action) { if (File.Exists(path)) { diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index b6ee04d..8061e28 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// - 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)) diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index f7989ab..b6f1f69 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs @@ -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); diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index db4e2ec..fa78a30 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications return m_welcomeMessage; } - private LoginResponse.BuddyList ConvertFriendListItem(List LFL) + private static LoginResponse.BuddyList ConvertFriendListItem(List LFL) { LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); foreach (FriendListItem fl in LFL) diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 91284e8..b0b7b1e 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications /// /// string to be examined /// true if slash is present - 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); -- cgit v1.1