Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed all instances of "SA1507 Code should not contain multiple blank… #1058

Merged
merged 3 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion TLM/TLM/Custom/AI/CustomTrolleybusAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ ref netManager.m_nodes.m_buffer[
}
}


[RedirectMethod]
[UsedImplicitly]
public bool CustomStartPathFind(ushort vehicleId,
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/Custom/PathFinding/CustomPathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ public bool CustomCreatePath(out uint unit,
return false;
}



/// <summary>
/// Finds a suitable path position for a walking citizen with the given world position.
/// If secondary lane constraints are given also checks whether there exists another lane that matches those constraints.
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/LoadingExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ public override void OnLevelLoaded(LoadMode mode) {
throw new Exception("pathManagerInstance is null");
}


PathManager stockPathManager = PathManager.instance;
if (stockPathManager == null) {
throw new Exception("stockPathManager is null");
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/Manager/Impl/JunctionRestrictionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,6 @@ private void SetSegmentEndFlags(ushort segmentId, bool startNode, SegmentEndFlag
}
}


private static ref NetNode GetNode(ushort segmentId, bool startNode) {
ref NetSegment segment = ref GetSeg(segmentId);
ushort nodeId = startNode ? segment.m_startNode : segment.m_endNode;
Expand Down Expand Up @@ -983,7 +982,6 @@ public bool SetPedestrianCrossingAllowed(ushort segmentId, bool startNode, Terna
return false;
}


segmentFlags_[segmentId].SetPedestrianCrossingAllowed(startNode, value);
OnSegmentChange(
segmentId,
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/Manager/Impl/LaneConnectionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public bool AreLanesConnected(uint sourceLaneId, uint targetLaneId, bool sourceS
&& connectedLanes.Any(laneId => laneId == targetLaneId);
}


/// <summary>
/// determines whether or not the input lane is heading toward a start node.
/// </summary>
Expand Down Expand Up @@ -90,7 +89,6 @@ public bool HasConnections(uint sourceLaneId) {
return HasConnections(sourceLaneId, IsHeadingTowardsStartNode(sourceLaneId));
}


/// <summary>
/// Determines if the given lane has outgoing connections
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/Manager/Impl/RoutingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,6 @@ protected void RecalculateLaneEndRoutingData(ushort segmentId,
++nextLaneIndex;
} // foreach lane


if (extendedLogRouting) {
Log._Debug(
$"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, " +
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/Manager/Impl/VehicleRestrictionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ internal ExtVehicleType GetDefaultAllowedVehicleTypes(
return ExtVehicleType.None;
}


/// <summary>
/// Restores all vehicle restrictions on a given segment to default state.
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/State/OptionsTabs/OptionsVehicleRestrictionsTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ public static void SetAllowEnterBlockedJunctions(bool value) {
ModUI.GetTrafficManagerTool(false)?.InitializeSubTools();
}


public static void SetPrioritySignsEnabled(bool newValue) {
Options.RebuildMenu();
Options.prioritySignsEnabled = newValue;
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/Traffic/Impl/SegmentEnd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ protected void MeasureOutgoingVehicle(bool logDebug,
return;
}


uint normLength = 10u;

if (avgSegmentLength > 0) {
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/TrafficLight/Impl/TimedTrafficLights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,6 @@ private void BackUpInvalidStepSegments(ref NetNode node) {
step.CustomSegmentLights.Remove(invalidSegmentId);
}


if (logTrafficLights) {
Log._DebugFormat(
"TimedTrafficLights.BackUpInvalidStepSegments finished for TTL step {0} @ " +
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/UI/Localization/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public static string GetTranslatedFileName(string filename, string language) {
"ResetOverriddenLocalizedStrings",
BindingFlags.Instance | BindingFlags.NonPublic);


public void ReloadTutorialTranslations() {
var locale = this.locale;
if (locale == null) {
Expand All @@ -217,7 +216,6 @@ public void ReloadTutorialTranslations() {

string lang = GetCurrentLanguage();


foreach (KeyValuePair<string, string> entry in tutorialsLookup_.AllLanguages[lang]) {
if (!entry.Key.StartsWith(TUTORIAL_KEY_PREFIX)) {
continue;
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/UI/SubTools/LaneConnectorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ ref segmentId.ToSegment(),
internal static int CountLanesTowardJunction(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, true);
internal static int CountLanesAgainstJunction(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, false);


public override void OnPrimaryClickOverlay() {
#if DEBUG
bool logLaneConn = DebugSwitch.LaneConnections.Get();
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/UI/SubTools/ParkingRestrictionsTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ private struct RenderData {
!(a == b);
}


/// <summary>
/// Stores potentially visible segment ids while the camera did not move
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/UI/SubTools/SpeedLimits/SpeedLimitsTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,6 @@ private bool DrawSpeedLimitHandles(ushort segmentId,

guiColor.a = TrafficManagerTool.GetHandleAlpha(hoveredHandle);


// Draw something right here, the road sign texture
GUI.color = guiColor;
SpeedValue displayLimit = new SpeedValue(
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/UI/SubTools/VehicleRestrictionsTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ private void GuiVehicleRestrictionsWindow(int num) {
DragWindow(ref windowRect);
}


private void AllVehiclesFunc(bool allow) {
// allow all vehicle types
NetInfo segmentInfo = SelectedSegmentId.ToSegment().Info;
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/UI/TrafficManagerTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ internal void Initialize() {
Log.Info("TrafficManagerTool: Initialization completed.");
}


public void OnUpdate(GlobalConfig config) {
InitializeSubTools();
}
Expand Down Expand Up @@ -1855,7 +1854,6 @@ internal static bool IsMouseOver(Rect boundingBox) {
return boundingBox.Contains(Event.current.mousePosition);
}


/// <summary>
/// this method should be used in OnToolGUI() instead of Input.GetMouseButtonDown(0).
/// This is because Input.GetMouseButtonDown(0) is consumed by OnToolUpdate()
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/Util/AutoTimedTrafficLights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ private static int CountLanes(ushort segmentId, ushort nodeId, bool outgoing = t
private static int CountOutgoingLanes(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, true);
private static int CountIncomingLanes(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, false);


/// <summary>
/// Counts the number of roads toward the given directions.
/// </summary>
Expand Down
2 changes: 0 additions & 2 deletions TLM/TLM/Util/PriorityRoad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ private static void FixMajorSegmentRules(ushort segmentId, ushort nodeId) {
TrafficPriorityManager.Instance.SetPrioritySign(segmentId, startNode, PriorityType.Main);
}


private static void FixMinorSegmentRules(ushort segmentId, ushort nodeId, List<ushort> segmentList) {
Log._Debug($"FixMinorSegmentRules({segmentId}, {nodeId}, segmentList) was called");
bool startNode = (bool)netService.IsStartNode(segmentId, nodeId);
Expand Down Expand Up @@ -434,7 +433,6 @@ ref segmentId.ToSegment(),
internal static int CountLanesTowardJunction(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, true);
internal static int CountLanesAgainstJunction(ushort segmentId, ushort nodeId) => CountLanes(segmentId, nodeId, false);


internal static bool HasAccelerationLane(List<ushort> segmentList, ushort segmentId, ushort nodeId) {
bool lht = LaneArrowManager.Instance.Services.SimulationService.TrafficDrivesOnLeft;
if (!segMan.CalculateIsOneWay(segmentId)) {
Expand Down
1 change: 0 additions & 1 deletion TLM/TLM/Util/RoundaboutMassEdit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ internal static float CalculateRadius(ref NetSegment segment) {
return r;
}


/// <summary>
/// calculates realisitic speed limit of input curved segment assuming it is part of a circle.
/// minimum speed is 10kmph.
Expand Down
1 change: 0 additions & 1 deletion TLM/TMPE.API/Manager/IExtSegmentEndManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public interface IExtSegmentEndManager {
/// <returns>compass direction</returns>
ArrowDirection GetDirection(ushort segmentId0, ushort segmentId1, ushort nodeId = 0);


/// <summary>
/// Determines whether the segment end is connected to highways only.
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion TLM/TMPE.API/Manager/IJunctionRestrictionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ bool GetDefaultPedestrianCrossingAllowed(ushort segmentId,

#region Set<Traffic Rule> : TernaryBool


/// <summary>
/// Sets the u-turn flag for the given segment end to the given value.
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion TLM/TMPE.GenericGameBridge/Service/INetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public LanePos(uint laneId,
}
}


public enum ClockDirection {
None,
Clockwise,
Expand Down