From da0a8d6c43054b1b6b7487fc5fc78f03af349c02 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 22 Oct 2019 12:39:50 +0100 Subject: [PATCH] remove some more useless NULL arguments --- OpenSim/Framework/Monitoring/StatsManager.cs | 6 +++--- OpenSim/Framework/Servers/MainServer.cs | 2 +- OpenSim/Framework/Servers/ServerBase.cs | 2 +- .../CoreModules/Asset/FlotsamAssetCache.cs | 12 ++++++------ .../Avatar/Attachments/AttachmentsModule.cs | 6 +++--- .../AvatarFactory/AvatarFactoryModule.cs | 2 +- .../Avatar/Commands/UserCommandsModule.cs | 5 ++--- .../Framework/Monitoring/MonitorModule.cs | 2 -- .../UserManagement/UserManagementModule.cs | 2 +- .../World/Land/LandManagementModule.cs | 6 +++--- .../CoreModules/World/Media/Moap/MoapModule.cs | 2 +- .../Objects/Commands/ObjectCommandsModule.cs | 14 +++++++------- .../World/Region/RegionCommandsModule.cs | 7 +++---- .../CoreModules/World/Region/RestartModule.cs | 2 +- .../CoreModules/World/Terrain/TerrainModule.cs | 7 ++----- .../World/Warp3DMap/Warp3DImageModule.cs | 2 +- .../CoreModules/World/Wind/WindModule.cs | 18 +++++++++--------- 17 files changed, 45 insertions(+), 52 deletions(-) diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs index 9646bd7669..05fb07a440 100755 --- a/OpenSim/Framework/Monitoring/StatsManager.cs +++ b/OpenSim/Framework/Monitoring/StatsManager.cs @@ -124,7 +124,7 @@ namespace OpenSim.Framework.Monitoring SortedDictionary> category; if (!RegisteredStats.TryGetValue(categoryName, out category)) { - con.Output("No such category as {0}", null, categoryName); + con.Output("No such category as {0}", categoryName); } else { @@ -151,13 +151,13 @@ namespace OpenSim.Framework.Monitoring else { con.Output( - "No such stat {0} in {1}.{2}", null, statName, categoryName, containerName); + "No such stat {0} in {1}.{2}", statName, categoryName, containerName); } } } else { - con.Output("No such container {0} in category {1}", null, containerName, categoryName); + con.Output("No such container {0} in category {1}", containerName, categoryName); } } } diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs index af6a63f918..a42ff83660 100755 --- a/OpenSim/Framework/Servers/MainServer.cs +++ b/OpenSim/Framework/Servers/MainServer.cs @@ -198,7 +198,7 @@ namespace OpenSim.Framework.Servers if (newDebug < 0 || newDebug > 6) { - MainConsole.Instance.Output("{0} is outside the valid debug level range of 0..6", null, newDebug); + MainConsole.Instance.Output("{0} is outside the valid debug level range of 0..6", newDebug); return; } diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 8545012094..81b112fbe9 100755 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -498,7 +498,7 @@ namespace OpenSim.Framework.Servers if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL) { - MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, null, newLevel); + MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, newLevel); return; } diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 03d023c828..5a48134b66 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -1075,14 +1075,14 @@ namespace OpenSim.Region.CoreModules.Asset { case "status": if (m_MemoryCacheEnabled) - con.Output("Memory Cache: {0} assets", null, m_MemoryCache.Count); + con.Output("Memory Cache: {0} assets", m_MemoryCache.Count); else con.Output("Memory cache disabled"); if (m_FileCacheEnabled) { int fileCount = GetFileCacheCount(m_CacheDirectory); - con.Output("File Cache: {0} assets", null, fileCount); + con.Output("File Cache: {0} assets", fileCount); } else { @@ -1099,7 +1099,7 @@ namespace OpenSim.Region.CoreModules.Asset { string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); - con.Output("Region: {0}, {1}", null, RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); + con.Output("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); } } @@ -1192,7 +1192,7 @@ namespace OpenSim.Region.CoreModules.Asset } m_cleanupRunning = false; } - con.Output("Completed check with {0} assets.", null, assetReferenceTotal); + con.Output("Completed check with {0} assets.", assetReferenceTotal); }, null, "TouchAllSceneAssets", false); break; @@ -1218,7 +1218,7 @@ namespace OpenSim.Region.CoreModules.Asset if (!DateTime.TryParse(s_expirationDate, out expirationDate)) { - con.Output("{0} is not a valid date & time", null, cmd); + con.Output("{0} is not a valid date & time", cmd); break; } @@ -1229,7 +1229,7 @@ namespace OpenSim.Region.CoreModules.Asset break; default: - con.Output("Unknown command {0}", null, cmd); + con.Output("Unknown command {0}", cmd); break; } } diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index a43db338a9..e342897372 100755 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -165,14 +165,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments { DebugLevel = debugLevel; MainConsole.Instance.Output( - "Set attachments debug level to {0} in {1}", null, DebugLevel, m_scene.Name); + "Set attachments debug level to {0} in {1}", DebugLevel, m_scene.Name); } } private void HandleDebugAttachmentsStatus(string module, string[] args) { - MainConsole.Instance.Output("Settings for {0}", null, m_scene.Name); - MainConsole.Instance.Output("Debug logging level: {0}", null, DebugLevel); + MainConsole.Instance.Output("Settings for {0}", m_scene.Name); + MainConsole.Instance.Output("Debug logging level: {0}", DebugLevel); } protected void HandleShowAttachmentsCommand(string module, string[] cmd) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 92616be1f6..b985630480 100755 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { Primitive.TextureEntryFace bakedTextureFace = bakedTextures[bakeType]; - if (bakedTextureFace == null) + if (bakedTextureFace == null || bakedTextureFace.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) continue; AssetBase asset; diff --git a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs index d98f11a2e1..c98e891786 100755 --- a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs @@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands if (user == null) { - MainConsole.Instance.Output("No user found with name {0} {1}", null, firstName, lastName); + MainConsole.Instance.Output("No user found with name {0} {1}", firstName, lastName); return; } @@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands if (!m.Success) { - MainConsole.Instance.Output("Invalid destination {0}", null, rawDestination); + MainConsole.Instance.Output("Invalid destination {0}", rawDestination); return; } } @@ -171,7 +171,6 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands MainConsole.Instance.Output( "Teleporting {0} to {1},{2},{3} in {4}", - null, user.Name, m.Groups["x"], m.Groups["y"], m.Groups["z"], regionName); diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index da103b5f59..72d267d019 100755 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -318,7 +318,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring { MainConsole.Instance.Output( "[MONITOR MODULE]: {0} reports {1} = {2}", - null, m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue()); } @@ -326,7 +325,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring { MainConsole.Instance.Output( "[MONITOR MODULE]: {0} reports {1} = {2}", - null, m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value); } } diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index cc2e61121e..c8ea2715d4 100755 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -1040,7 +1040,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement if(!GetUser(userId, out ud)) { - MainConsole.Instance.Output("No name known for user with id {0}", null, userId); + MainConsole.Instance.Output("No name known for user with id {0}", userId); return; } diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 6985549663..c1056d565c 100755 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -2536,11 +2536,11 @@ namespace OpenSim.Region.CoreModules.World.Land if (response.ToLower() == "y") { Clear(true); - MainConsole.Instance.Output("Cleared all parcels from {0}", null, m_scene.Name); + MainConsole.Instance.Output("Cleared all parcels from {0}", m_scene.Name); } else { - MainConsole.Instance.Output("Aborting clear of all parcels from {0}", null, m_scene.Name); + MainConsole.Instance.Output("Aborting clear of all parcels from {0}", m_scene.Name); } } @@ -2568,7 +2568,7 @@ namespace OpenSim.Region.CoreModules.World.Land { if (!m_landList.TryGetValue(landLocalId, out lo)) { - MainConsole.Instance.Output("No parcel found with local ID {0}", null, landLocalId); + MainConsole.Instance.Output("No parcel found with local ID {0}", landLocalId); return; } } diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 66a7df162f..ccf45c1770 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap protected void SetPartMediaFlags(SceneObjectPart part, int face, bool flag) { Primitive.TextureEntry te = part.Shape.Textures; - Primitive.TextureEntryFace teFace = te.CreateFace((uint)face); + Primitive.TextureEntryFace teFace = te.GetFace((uint)face); teFace.MediaFlags = flag; part.Shape.Textures = te; } diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index e118b665cb..18a16c2fb0 100755 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) { - m_console.Output("Error: Start vector '{0}' does not have a valid format", null, rawConsoleStartVector); + m_console.Output("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); return; } @@ -460,7 +460,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) { - m_console.Output("Error: End vector '{0}' does not have a valid format", null, rawConsoleEndVector); + m_console.Output("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector); return; } @@ -809,7 +809,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if(so.IsAttachment) { requireConfirmation = true; - m_console.Output("Warning: object with uuid {0} is a attachment", null, uuid); + m_console.Output("Warning: object with uuid {0} is a attachment", uuid); } } break; @@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands break; default: - m_console.Output("Unrecognized mode {0}", null, mode); + m_console.Output("Unrecognized mode {0}", mode); return; } @@ -871,17 +871,17 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (response.ToLower() != "y") { MainConsole.Instance.Output( - "Aborting delete of {0} objects from {1}", null, deletes.Count, m_scene.RegionInfo.RegionName); + "Aborting delete of {0} objects from {1}", deletes.Count, m_scene.RegionInfo.RegionName); return; } } - m_console.Output("Deleting {0} objects in {1}", null, deletes.Count, m_scene.RegionInfo.RegionName); + m_console.Output("Deleting {0} objects in {1}", deletes.Count, m_scene.RegionInfo.RegionName); foreach (SceneObjectGroup g in deletes) { - m_console.Output("Deleting object {0} {1}", null, g.UUID, g.Name); + m_console.Output("Deleting object {0} {1}", g.UUID, g.Name); m_scene.DeleteSceneObject(g, false); } } diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs index 2a661a66c1..8d92cc85e4 100755 --- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs @@ -226,7 +226,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands { MainConsole.Instance.Output( "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit", - null, newValue, m_scene.Name, ri.AgentCapacity); } else @@ -234,7 +233,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands rs.AgentLimit = newValue; MainConsole.Instance.Output( - "{0} set to {1} in {2}", "agent-limit", null, newValue, m_scene.Name); + "{0} set to {1} in {2}", "agent-limit", newValue, m_scene.Name); } rs.Save(); @@ -249,14 +248,14 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands ri.AgentCapacity = newValue; MainConsole.Instance.Output( - "{0} set to {1} in {2}", "max-agent-limit", null, newValue, m_scene.Name); + "max-agent-limit set to {0} in {1}", newValue, m_scene.Name); if (ri.AgentCapacity < rs.AgentLimit) { rs.AgentLimit = ri.AgentCapacity; MainConsole.Instance.Output( - "Reducing {0} to {1} in {2}", null, "agent-limit", rs.AgentLimit, m_scene.Name); + "agent-limit set to {0} in {1}", rs.AgentLimit, m_scene.Name); } rs.Save(); diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index 6d3daf2b78..d0fae252d3 100755 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs @@ -338,7 +338,7 @@ namespace OpenSim.Region.CoreModules.World.Region times.Add(Convert.ToInt32(args[i])); MainConsole.Instance.Output( - "Region {0} scheduled for restart in {1} seconds", null, m_Scene.Name, times.Sum()); + "Region {0} scheduled for restart in {1} seconds", m_Scene.Name, times.Sum()); ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice); } diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index d8c118fa6f..02f0d3d2c1 100755 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -793,7 +793,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain { MainConsole.Instance.Output( "ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.", - null, m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY); return; @@ -813,7 +812,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain MainConsole.Instance.Output( "Saved terrain from ({0},{1}) to ({2},{3}) from {4} to {5}", - null, fileStartX, fileStartY, fileStartX + fileWidth - 1, fileStartY + fileHeight - 1, m_scene.RegionInfo.RegionName, filename); } @@ -824,7 +822,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain MainConsole.Instance.Output( "ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}", - null, m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); } @@ -1706,8 +1703,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain double avg = sum / (m_channel.Height * m_channel.Width); - MainConsole.Instance.Output("Channel {0}x{1}", null, m_channel.Width, m_channel.Height); - MainConsole.Instance.Output("max/min/avg/sum: {0}/{1}/{2}/{3}", null, max, min, avg, sum); + MainConsole.Instance.Output("Channel {0}x{1}", m_channel.Width, m_channel.Height); + MainConsole.Instance.Output("max/min/avg/sum: {0}/{1}/{2}/{3}", max, min, avg, sum); } private void InterfaceEnableExperimentalBrushes(Object[] args) diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 131137e0d1..4c922ba9ae 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -799,7 +799,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap } catch (Exception e) { - m_log.WarnFormat("[Warp3D]: Failed to decode texture {0} for prim {1} at {2}, exception {3} ", id.ToString(), sop.Name, sop.GetWorldPosition().ToString(), e.Message); + m_log.WarnFormat("[Warp3D]: Failed to decode texture {0} for prim {1} at {2}, exception {3}", id.ToString(), sop.Name, sop.GetWorldPosition().ToString(), e.Message); } } else diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index c9580d260e..51faa0e4d8 100755 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules else { MainConsole.Instance.Output( - "Invalid value {0} specified for {1}", null, cmdparams[3], cmdparams[2]); + "Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]); return; } @@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules if (desiredPlugin.Equals(m_activeWindPlugin.Name)) { - MainConsole.Instance.Output("Wind model plugin {0} is already active", null, cmdparams[3]); + MainConsole.Instance.Output("Wind model plugin {0} is already active", cmdparams[3]); return; } @@ -285,11 +285,11 @@ namespace OpenSim.Region.CoreModules { m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]]; - MainConsole.Instance.Output("{0} wind model plugin now active", null, m_activeWindPlugin.Name); + MainConsole.Instance.Output("{0} wind model plugin now active", m_activeWindPlugin.Name); } else { - MainConsole.Instance.Output("Could not find wind model plugin {0}", null, desiredPlugin); + MainConsole.Instance.Output("Could not find wind model plugin {0}", desiredPlugin); } break; } @@ -317,17 +317,17 @@ namespace OpenSim.Region.CoreModules { if (!float.TryParse(cmdparams[3], out value)) { - MainConsole.Instance.Output("Invalid value {0}", null, cmdparams[3]); + MainConsole.Instance.Output("Invalid value {0}", cmdparams[3]); } try { WindParamSet(plugin, param, value); - MainConsole.Instance.Output("{0} set to {1}", null, param, value); + MainConsole.Instance.Output("{0} set to {1}", param, value); } catch (Exception e) { - MainConsole.Instance.Output("{0}", null, e.Message); + MainConsole.Instance.Output("{0}", e.Message); } } else @@ -335,11 +335,11 @@ namespace OpenSim.Region.CoreModules try { value = WindParamGet(plugin, param); - MainConsole.Instance.Output("{0} : {1}", null, param, value); + MainConsole.Instance.Output("{0} : {1}", param, value); } catch (Exception e) { - MainConsole.Instance.Output("{0}", null, e.Message); + MainConsole.Instance.Output("{0}", e.Message); } }