mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
== string.Empty is .Lenght == 0
This commit is contained in:
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||
return;
|
||||
|
||||
m_URL = config.GetString("URL", String.Empty);
|
||||
if (m_URL == String.Empty)
|
||||
if (m_URL.Length == 0)
|
||||
return;
|
||||
|
||||
m_enabled = true;
|
||||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||
|
||||
public WearableCacheItem[] Get(UUID id)
|
||||
{
|
||||
if (m_URL == String.Empty)
|
||||
if (m_URL.Length == 0)
|
||||
return null;
|
||||
|
||||
using (RestClient rc = new RestClient(m_URL))
|
||||
@@ -188,7 +188,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||
|
||||
public void Store(UUID agentId, WearableCacheItem[] data)
|
||||
{
|
||||
if (m_URL == String.Empty)
|
||||
if (m_URL.Length == 0)
|
||||
return;
|
||||
|
||||
int numberWears = 0;
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
// We need to look for its information in the friends list itself
|
||||
FriendInfo[] finfos = null;
|
||||
bool confirming = false;
|
||||
if (friendUUI == string.Empty)
|
||||
if (friendUUI.Length == 0)
|
||||
{
|
||||
finfos = GetFriendsFromCache(agentID);
|
||||
foreach (FriendInfo finfo in finfos)
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
Util.FireAndForget(delegate
|
||||
{
|
||||
bool success = false;
|
||||
if (foreigner && url == string.Empty) // we don't know about this user
|
||||
if (foreigner && url.Length == 0) // we don't know about this user
|
||||
{
|
||||
string recipientUUI = TryGetRecipientUUI(new UUID(im.fromAgentID), toAgentID);
|
||||
//m_log.DebugFormat("[HG MESSAGE TRANSFER]: Got UUI {0}", recipientUUI);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
}
|
||||
|
||||
m_RestURL = cnf.GetString("OfflineMessageURL", "");
|
||||
if (m_RestURL == "")
|
||||
if (m_RestURL.Length == 0)
|
||||
{
|
||||
m_log.Error("[OFFLINE MESSAGING] Module was enabled, but no URL is given, disabling");
|
||||
enabled = false;
|
||||
@@ -188,7 +188,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
|
||||
private void RetrieveInstantMessages(IClientAPI client)
|
||||
{
|
||||
if (m_RestURL == String.Empty)
|
||||
if (m_RestURL.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
List<InventoryFolderBase> foundFolders = new List<InventoryFolderBase>();
|
||||
|
||||
if (path == string.Empty)
|
||||
if (path.Length == 0)
|
||||
{
|
||||
foundFolders.Add(startFolder);
|
||||
return foundFolders;
|
||||
|
||||
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
"[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}",
|
||||
inventoryFolder.Name,
|
||||
inventoryFolder.ID,
|
||||
m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath);
|
||||
m_invPath.Length == 0 ? InventoryFolderImpl.PATH_DELIMITER : m_invPath);
|
||||
|
||||
//recurse through all dirs getting dirs and files
|
||||
SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly, options, userAccountService);
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
|
||||
bool ok = true;
|
||||
bool foreign = GetUserProfileServerURI(avatarID, out serverURI);
|
||||
if(serverURI == string.Empty)
|
||||
if(serverURI.Length == 0)
|
||||
ok = false;
|
||||
|
||||
Byte[] membershipType = new Byte[1];
|
||||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
int val_flags = acc.UserFlags;
|
||||
flags = (uint)(val_flags & 0xff);
|
||||
|
||||
if (acc.UserTitle == "")
|
||||
if (acc.UserTitle.Length == 0)
|
||||
membershipType[0] = (byte)((val_flags & 0x0f00) >> 8);
|
||||
else
|
||||
membershipType = Utils.StringToBytes(acc.UserTitle);
|
||||
@@ -1594,7 +1594,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
|
||||
if (null != account)
|
||||
{
|
||||
if (account.UserTitle == "")
|
||||
if (account.UserTitle.Length == 0)
|
||||
membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
|
||||
else
|
||||
membershipType = Utils.StringToBytes(account.UserTitle);
|
||||
@@ -1607,7 +1607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
{
|
||||
if (GetUserAccountData(avatarID, out userInfo) == true)
|
||||
{
|
||||
if ((string)userInfo["user_title"] == "")
|
||||
if ((string)userInfo["user_title"].Length == 0)
|
||||
membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
|
||||
else
|
||||
membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
|
||||
|
||||
Reference in New Issue
Block a user