Skip to content

Commit 096c1e3

Browse files
committed
Fix comments + small changes.
1 parent e70983e commit 096c1e3

10 files changed

+23
-25
lines changed

Nodes/BaseContainerNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public virtual void InsertBytes(int index, int size, ref List<BaseNode> createdN
142142

143143
while (size != 0)
144144
{
145-
BaseNode node = null;
145+
BaseNode node;
146146
#if WIN64
147147
if (size >= 8)
148148
{

Nodes/BaseFunctionPtrNode.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,10 @@ protected int Draw(ViewInfo view, int x, int y, string type, string name)
5959
if (module != null)
6060
{
6161
var symbols = view.Memory.Process.Symbols.GetSymbolsForModule(module);
62-
if (symbols != null)
62+
var symbol = symbols?.GetSymbolString(value, module);
63+
if (!string.IsNullOrEmpty(symbol))
6364
{
64-
var symbol = symbols.GetSymbolString(value, module);
65-
if (!string.IsNullOrEmpty(symbol))
66-
{
67-
x = AddText(view, x, y, view.Settings.OffsetColor, HotSpot.ReadOnlyId, symbol) + view.Font.Width;
68-
}
65+
AddText(view, x, y, view.Settings.OffsetColor, HotSpot.ReadOnlyId, symbol);
6966
}
7067
}
7168
}

Nodes/BaseNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ protected void AddSelection(ViewInfo view, int x, int y, int height)
280280
AddHotSpot(view, new Rectangle(0, y, view.ClientArea.Right - (IsSelected ? 16 : 0), height), string.Empty, -1, HotSpotType.Select);
281281
}
282282

283-
/// <summary>Draws an icon and adds a <see cref="HotSpot"/> if <paramref name="hitId"/> is not <see cref="HotSpot.NoneId"/>.</summary>
283+
/// <summary>Draws an icon and adds a <see cref="HotSpot"/> if <paramref name="id"/> is not <see cref="HotSpot.NoneId"/>.</summary>
284284
/// <param name="view">The view information.</param>
285285
/// <param name="x">The x coordinate.</param>
286286
/// <param name="y">The y coordinate.</param>

Nodes/ClassNode.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ public override int Draw(ViewInfo view, int x, int y)
104104
x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, "Class") + view.Font.Width;
105105
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name) + view.Font.Width;
106106
x = AddText(view, x, y, view.Settings.ValueColor, HotSpot.NoneId, $"[{MemorySize}]") + view.Font.Width;
107-
x = AddComment(view, x, y);
107+
AddComment(view, x, y);
108108

109109
y += view.Font.Height;
110+
110111
if (levelsOpen[view.Level])
111112
{
112113
var nv = view.Clone();

Nodes/FunctionNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public override int Draw(ViewInfo view, int x, int y)
5050

5151
x = AddOpenClose(view, x, y) + view.Font.Width;
5252

53-
x = AddComment(view, x, y);
53+
AddComment(view, x, y);
5454

5555
var ptr = view.Address.Add(Offset);
5656

@@ -60,12 +60,12 @@ public override int Draw(ViewInfo view, int x, int y)
6060
{
6161
y += view.Font.Height;
6262
x = AddText(view, tx, y, view.Settings.TypeColor, HotSpot.NoneId, "Signature:") + view.Font.Width;
63-
x = AddText(view, x, y, view.Settings.ValueColor, 0, Signature);
63+
AddText(view, x, y, view.Settings.ValueColor, 0, Signature);
6464

6565
y += view.Font.Height;
6666
x = AddText(view, tx, y, view.Settings.TextColor, HotSpot.NoneId, "Belongs to: ");
6767
x = AddText(view, x, y, view.Settings.ValueColor, HotSpot.NoneId, BelongsToClass == null ? "<None>" : $"<{BelongsToClass.Name}>");
68-
x = AddIcon(view, x, y, Icons.Change, 1, HotSpotType.ChangeType);
68+
AddIcon(view, x, y, Icons.Change, 1, HotSpotType.ChangeType);
6969

7070
y = DrawInstructions(view, tx, y + 4) + 4;
7171
}

Nodes/Matrix4x4Node.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
6666
x = AddText(view, x, y, view.Settings.ValueColor, 2, $"{value._13,14:0.000}");
6767
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
6868
x = AddText(view, x, y, view.Settings.ValueColor, 3, $"{value._14,14:0.000}");
69-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
69+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
7070

7171
y += view.Font.Height;
7272
x = defaultX;
@@ -78,7 +78,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
7878
x = AddText(view, x, y, view.Settings.ValueColor, 6, $"{value._23,14:0.000}");
7979
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
8080
x = AddText(view, x, y, view.Settings.ValueColor, 7, $"{value._24,14:0.000}");
81-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
81+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
8282

8383
y += view.Font.Height;
8484
x = defaultX;
@@ -90,7 +90,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
9090
x = AddText(view, x, y, view.Settings.ValueColor, 10, $"{value._33,14:0.000}");
9191
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
9292
x = AddText(view, x, y, view.Settings.ValueColor, 11, $"{value._34,14:0.000}");
93-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
93+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
9494

9595
y += view.Font.Height;
9696
x = defaultX;
@@ -102,7 +102,7 @@ public override int Draw(ViewInfo view, int x2, int y2)
102102
x = AddText(view, x, y, view.Settings.ValueColor, 14, $"{value._43,14:0.000}");
103103
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, ",");
104104
x = AddText(view, x, y, view.Settings.ValueColor, 15, $"{value._44,14:0.000}");
105-
x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
105+
AddText(view, x, y, view.Settings.NameColor, HotSpot.NoneId, "|");
106106
});
107107
}
108108

Nodes/NodeUuid.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private void CreateNew()
103103
}
104104

105105
/// <summary>Sets the UUID to the given value.</summary>
106-
/// <param name="uuidBytes">Initial value of the <see cref="NodeUuid"/> object.</param>
106+
/// <param name="valueBytes">Initial value of the <see cref="NodeUuid"/> object.</param>
107107
private void SetValue(byte[] valueBytes)
108108
{
109109
Contract.Requires(valueBytes != null);
@@ -135,7 +135,7 @@ public bool Equals(NodeUuid other)
135135
return false;
136136
}
137137

138-
for (int i = 0; i < UuidSize; ++i)
138+
for (var i = 0; i < UuidSize; ++i)
139139
{
140140
if (uuidBytes[i] != other.uuidBytes[i])
141141
{
@@ -165,7 +165,7 @@ public override int GetHashCode()
165165

166166
public int CompareTo(NodeUuid other)
167167
{
168-
for (int i = 0; i < UuidSize; ++i)
168+
for (var i = 0; i < UuidSize; ++i)
169169
{
170170
if (uuidBytes[i] < other.uuidBytes[i])
171171
{

Nodes/Vector2Node.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ struct Vector2Data
1919

2020
/// <summary>Draws this node.</summary>
2121
/// <param name="view">The view information.</param>
22-
/// <param name="x">The x coordinate.</param>
23-
/// <param name="y">The y coordinate.</param>
22+
/// <param name="x2">The x coordinate.</param>
23+
/// <param name="y2">The y coordinate.</param>
2424
/// <returns>The height the node occupies.</returns>
2525
public override int Draw(ViewInfo view, int x2, int y2)
2626
{

Nodes/Vector3Node.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ struct Vector3Data
2121

2222
/// <summary>Draws this node.</summary>
2323
/// <param name="view">The view information.</param>
24-
/// <param name="x">The x coordinate.</param>
25-
/// <param name="y">The y coordinate.</param>
24+
/// <param name="x2">The x coordinate.</param>
25+
/// <param name="y2">The y coordinate.</param>
2626
/// <returns>The height the node occupies.</returns>
2727
public override int Draw(ViewInfo view, int x2, int y2)
2828
{

Nodes/Vector4Node.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ struct Vector4Data
2323

2424
/// <summary>Draws this node.</summary>
2525
/// <param name="view">The view information.</param>
26-
/// <param name="x">The x coordinate.</param>
27-
/// <param name="y">The y coordinate.</param>
26+
/// <param name="x2">The x coordinate.</param>
27+
/// <param name="y2">The y coordinate.</param>
2828
/// <returns>The height the node occupies.</returns>
2929
public override int Draw(ViewInfo view, int x2, int y2)
3030
{

0 commit comments

Comments
 (0)