From a361dc725be92a96191658d4068540e43174fc6c Mon Sep 17 00:00:00 2001 From: D4VID Date: Tue, 8 Jul 2025 15:42:12 +0200 Subject: [PATCH] Fix naming warnings --- .../client/tool/CriticalPathAnalyzerTool.cs | 8 +++---- .../src/server/tool/ServerPathTracer.cs | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CriticalPathAnalyzer/CriticalPathAnalyzer/src/client/tool/CriticalPathAnalyzerTool.cs b/CriticalPathAnalyzer/CriticalPathAnalyzer/src/client/tool/CriticalPathAnalyzerTool.cs index 2e84daf..967e29f 100644 --- a/CriticalPathAnalyzer/CriticalPathAnalyzer/src/client/tool/CriticalPathAnalyzerTool.cs +++ b/CriticalPathAnalyzer/CriticalPathAnalyzer/src/client/tool/CriticalPathAnalyzerTool.cs @@ -21,8 +21,8 @@ namespace CriticalPathAnalyzer.Client.Tool { private static AnalyzePathResponse _response; private static Node _selectedNode; - private static readonly OutlineData StartOutline = new OutlineData(new Color24(0x00ff00)); - private static readonly OutlineData EndOutline = new OutlineData(new Color24(0x00aaff)); + private static readonly OutlineData startOutline = new OutlineData(new Color24(0x00ff00)); + private static readonly OutlineData endOutline = new OutlineData(new Color24(0x00aaff)); public static void Init(ILogicLogger logger) { _logger = logger; @@ -76,7 +76,7 @@ namespace CriticalPathAnalyzer.Client.Tool { PegAddress pegAddress = RayCastPeg(); if (!pegAddress.IsEmpty()) { Outliner.RemoveOutline(_startPegAddress); - Outliner.Outline(pegAddress, StartOutline); + Outliner.Outline(pegAddress, startOutline); _startPegAddress = pegAddress; if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) { CalculateCriticalPath(); @@ -121,7 +121,7 @@ namespace CriticalPathAnalyzer.Client.Tool { PegAddress pegAddress = RayCastPeg(); if (!pegAddress.IsEmpty()) { Outliner.RemoveOutline(_endPegAddress); - Outliner.Outline(pegAddress, EndOutline); + Outliner.Outline(pegAddress, endOutline); _endPegAddress = pegAddress; if (!_startPegAddress.IsEmpty() && !_endPegAddress.IsEmpty()) { CalculateCriticalPath(); diff --git a/CriticalPathAnalyzer/CriticalPathAnalyzer/src/server/tool/ServerPathTracer.cs b/CriticalPathAnalyzer/CriticalPathAnalyzer/src/server/tool/ServerPathTracer.cs index 1b0da26..d8e2a9c 100644 --- a/CriticalPathAnalyzer/CriticalPathAnalyzer/src/server/tool/ServerPathTracer.cs +++ b/CriticalPathAnalyzer/CriticalPathAnalyzer/src/server/tool/ServerPathTracer.cs @@ -14,19 +14,19 @@ using LogicWorld.Server.Circuitry; namespace CriticalPathAnalyzer.Server.Tool { public class ServerPathTracer { // Reflection/Delegate access helpers: - private static readonly Func GetCluster; + private static readonly Func getCluster; // Services needed to lookup wires/pegs: - private static readonly ICircuitryManager Circuits; - private static readonly IWorldData World; + private static readonly ICircuitryManager circuits; + private static readonly IWorldData world; static ServerPathTracer() { - GetCluster = Delegator.createPropertyGetter( + getCluster = Delegator.createPropertyGetter( Properties.getPrivate(typeof(InputPeg), "Cluster") ); - Circuits = ServiceGetter.getService(); - World = ServiceGetter.getService(); + circuits = ServiceGetter.getService(); + world = ServiceGetter.getService(); } public static bool TracePath( @@ -342,7 +342,7 @@ namespace CriticalPathAnalyzer.Server.Tool { /// Address of the peg /// True if it exists, false if it doesn't private static bool PegExists(PegAddress address) { - IComponentInWorld component = World.Lookup(address.ComponentAddress); + IComponentInWorld component = world.Lookup(address.ComponentAddress); if (component == null) { return false; // Component of the peg does not exist in world. } @@ -353,13 +353,13 @@ namespace CriticalPathAnalyzer.Server.Tool { } private static Cluster GetClusterAt(InputAddress peg) { - InputPeg originPeg = Circuits.LookupInput(peg); + InputPeg originPeg = circuits.LookupInput(peg); if (originPeg == null) { throw new Exception( "Tried to lookup cluster on input peg, but the peg was not present in the circuit model! This should never happen, as the peg is present in the world."); } - Cluster cluster = GetCluster(originPeg); + Cluster cluster = getCluster(originPeg); if (cluster == null) { throw new Exception( "Tried to lookup cluster on input peg, but the cluster was 'null', this should never happen! As the peg is present in the world."); @@ -378,13 +378,13 @@ namespace CriticalPathAnalyzer.Server.Tool { if (pegAddress.IsInputAddress(out InputAddress inputAddress)) { primaryClusters.Add(GetClusterAt(inputAddress)); } else { - HashSet wires = World.LookupPegWires(pegAddress); + HashSet wires = world.LookupPegWires(pegAddress); if (wires == null) { return; } foreach (WireAddress wireAddress in wires) { - Wire wire = World.Lookup(wireAddress); + Wire wire = world.Lookup(wireAddress); if (wire == null) { throw new Exception( "Tried to lookup wire given its address, but the world did not contain it. World must be corrupted.");