== string.Empty is .Lenght == 0

This commit is contained in:
UbitUmarov
2022-01-13 20:31:52 +00:00
parent 6595e3ae26
commit fbbcc1edd7
149 changed files with 261 additions and 264 deletions

View File

@@ -444,12 +444,12 @@ namespace OpenSim.Framework
MainConsole.Instance.Output("the default is displayed between [ ] brackets.\n");
MainConsole.Instance.Output("=====================================\n");
if (name == String.Empty)
if (name.Length == 0)
{
while (name.Trim() == string.Empty)
while (name.Trim().Length == 0)
{
name = MainConsole.Instance.Prompt("New region name", name);
if (name.Trim() == string.Empty)
if (name.Trim().Length == 0)
{
MainConsole.Instance.Output("Cannot interactively create region with no name");
}
@@ -461,7 +461,7 @@ namespace OpenSim.Framework
creatingNew = true;
}
if (name == String.Empty)
if (name.Length == 0)
name = source.Configs[0].Name;
if (source.Configs[name] == null)
@@ -505,7 +505,7 @@ namespace OpenSim.Framework
//
allKeys.Remove("Location");
string location = config.GetString("Location", String.Empty);
if (location == String.Empty)
if (location.Length == 0)
{
location = MainConsole.Instance.Prompt("Region Location", "1000,1000");
config.Set("Location", location);