daily update on 20230716 by nitload youmu, another bug in linked list

This commit is contained in:
Nitload
2023-07-16 05:30:04 +08:00
parent 28a9c22f01
commit 80cdd610ce
23 changed files with 21 additions and 11 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11 -5
View File
@@ -109,14 +109,20 @@ namespace StgSharp
internal LinkedListNode<T> Find(T value) internal LinkedListNode<T> Find(T value)
{ {
foreach (LinkedListNode<T> node in this) LinkedListNode<T> enumerator = this._hook;
do
{ {
if (node._value.Equals(value)) enumerator = enumerator._next;
Console.WriteLine(enumerator.Value.ToString());
} while (!enumerator.Value.Equals(value)
|| enumerator == _hook);
if (enumerator == _hook)
{ {
return node; throw new Exception();
} }
}
throw new Exception("Value not found in this LinkedList"); return enumerator;
} }
public void Clear() public void Clear()
+5 -1
View File
@@ -1,7 +1,11 @@
namespace StgSharp.Math using System.Net.NetworkInformation;
namespace StgSharp.Math
{ {
public static partial class Calc public static partial class Calc
{ {
public const float Pi = 3.1415926f;
private static readonly float[] sinData = private static readonly float[] sinData =
{ {
0f, 0.15643446239373f, 0.309016989278255f, 0.453990492577218f, 0.587785243621462f, 0f, 0.15643446239373f, 0.309016989278255f, 0.453990492577218f, 0.587785243621462f,
+4 -4
View File
@@ -20,10 +20,10 @@ namespace StgSharp
list.Add(str); list.Add(str);
} }
foreach (string str in list) string a = "sdfsdfdsfds";
{ list.Add(a);
Console.WriteLine(str);
} list.Remove(a);
/* /*
Form f2 = new Form(); Form f2 = new Form();