Auto-properties in LslTools

This commit is contained in:
Cinder Roxley
2024-06-30 16:43:03 -05:00
parent cfc54886d6
commit 93e9ac75e2
2 changed files with 8 additions and 10 deletions

View File

@@ -33,7 +33,6 @@ namespace LibreMetaverse
{
private ObjectList.Link head;
private ObjectList.Link last;
private int count;
private void Add0(ObjectList.Link a)
{
@@ -55,26 +54,26 @@ namespace LibreMetaverse
public void Add(object o)
{
this.Add0(new ObjectList.Link(o, (ObjectList.Link)null));
++this.count;
++this.Count;
}
public void Push(object o)
{
this.head = new ObjectList.Link(o, this.head);
++this.count;
++this.Count;
}
public object Pop()
{
object it = this.head.it;
this.head = this.head.next;
--this.count;
--this.Count;
return it;
}
public object Top => this.head.it;
public int Count => this.count;
public int Count { get; private set; }
public object this[int ix] => this.Get0(this.head, ix);

View File

@@ -303,21 +303,20 @@ namespace LibreMetaverse.LslTools
public class _Enumerator
{
private Lexer lxr;
private TOKEN t;
public _Enumerator(Lexer x)
{
this.lxr = x;
this.t = (TOKEN) null;
this.Current = (TOKEN) null;
}
public bool MoveNext()
{
this.t = this.lxr.Next();
return this.t != null;
this.Current = this.lxr.Next();
return this.Current != null;
}
public TOKEN Current => this.t;
public TOKEN Current { get; private set; }
public void Reset()
{