Cleanup 3

This commit is contained in:
W2.Wizard
2021-02-21 11:09:04 +01:00
parent 92fafe877c
commit 20ba37e223
24 changed files with 181 additions and 119 deletions

View File

@@ -393,7 +393,7 @@ namespace FlaxEditor.Surface.Archetypes
int count = 0;
if (ExtractNumber(ref filterText, out vec[count]))
{
count = count + 1;
count++;
while (count < 4)
{
if (ExtractComma(ref filterText) && ExtractNumber(ref filterText, out vec[count]))

View File

@@ -305,8 +305,11 @@ namespace FlaxEditor.Surface.Elements
if (HasAnyConnection)
{
// Remove all connections
var toUpdate = new List<Box>(1 + Connections.Count);
toUpdate.Add(this);
var toUpdate = new List<Box>(1 + Connections.Count)
{
this
};
for (int i = 0; i < Connections.Count; i++)
{
var targetBox = Connections[i];

View File

@@ -146,9 +146,10 @@ namespace FlaxEditor.Surface
for (int i = 0; i < entries; i++)
{
Entry e = new Entry();
e.TypeID = stream.ReadInt32();
Entry e = new Entry
{
TypeID = stream.ReadInt32()
};
stream.ReadInt64(); // don't use CreationTime
uint dataSize = stream.ReadUInt32();

View File

@@ -76,9 +76,11 @@ namespace FlaxEditor.Surface.Undo
var iB = _input.Get(context);
var oB = _output.Get(context);
var toUpdate = new HashSet<Box>();
toUpdate.Add(iB);
toUpdate.Add(oB);
var toUpdate = new HashSet<Box>
{
iB,
oB
};
toUpdate.AddRange(iB.Connections);
toUpdate.AddRange(oB.Connections);