mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
* 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:
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user