Skip to content

Commit 3dd093c

Browse files
committed
The Add/InsertBytes method should not be part of the container class.
1 parent 2820724 commit 3dd093c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ReClass.NET/Nodes/BaseContainerNode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void InsertBytes(BaseNode position, int size)
169169
/// <summary>Inserts <paramref name="size"/> bytes at the specified position.</summary>
170170
/// <param name="index">Zero-based position.</param>
171171
/// <param name="size">The number of bytes to insert.</param>
172-
public void InsertBytes(int index, int size)
172+
protected void InsertBytes(int index, int size)
173173
{
174174
List<BaseNode> dummy = null;
175175
InsertBytes(index, size, ref dummy);
@@ -179,7 +179,7 @@ public void InsertBytes(int index, int size)
179179
/// <param name="index">Zero-based position.</param>
180180
/// <param name="size">The number of bytes to insert.</param>
181181
/// <param name="createdNodes">[in,out] A list with the created nodes.</param>
182-
public virtual void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
182+
protected virtual void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
183183
{
184184
if (index < 0 || index > nodes.Count || size == 0)
185185
{

ReClass.NET/Nodes/ClassNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void UpdateAddress(RemoteProcess process)
206206
}
207207
}
208208

209-
public override void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
209+
protected override void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
210210
{
211211
base.InsertBytes(index, size, ref createdNodes);
212212

ReClass.NET/Nodes/VTableNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public override int CalculateDrawnHeight(ViewInfo view)
112112

113113
public override bool ReplaceChildNode(int index, Type nodeType, ref List<BaseNode> createdNodes) => false;
114114

115-
public override void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
115+
protected override void InsertBytes(int index, int size, ref List<BaseNode> createdNodes)
116116
{
117117
if (index < 0 || index > nodes.Count || size == 0)
118118
{

0 commit comments

Comments
 (0)