Skip to content

Commit bbf7d35

Browse files
committed
Fix compiler warnings
1 parent 1473bb6 commit bbf7d35

7 files changed

Lines changed: 1 addition & 49 deletions

File tree

Ooui/Button.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace Ooui
77
{
88
public class Button : FormControl
99
{
10-
ButtonType typ = ButtonType.Submit;
1110
public ButtonType Type {
1211
get => GetAttribute ("type", ButtonType.Submit);
1312
set => SetAttributeProperty ("type", value);

Ooui/Element.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public string Title {
2020
set => SetAttributeProperty ("title", value);
2121
}
2222

23-
bool hidden = false;
2423
public bool IsHidden {
2524
get => GetBooleanAttribute ("hidden");
2625
set => SetBooleanAttributeProperty ("hidden", value);

Ooui/Form.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ namespace Ooui
44
{
55
public class Form : Element
66
{
7-
string action = "";
87
public string Action {
98
get => GetStringAttribute ("action", "");
109
set => SetAttributeProperty ("action", value ?? "");

Ooui/FormControl.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public string Name {
99
set => SetAttributeProperty ("name", value);
1010
}
1111

12-
bool isDisabled = false;
1312
public bool IsDisabled {
1413
get => GetBooleanAttribute ("disabled");
1514
set => SetBooleanAttributeProperty ("disabled", value);

Ooui/Ooui.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
1010
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
1111
<TargetFrameworks>netstandard2.0</TargetFrameworks>
12+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1213
</PropertyGroup>
1314

1415
<ItemGroup>

Ooui/TextArea.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public int Rows {
2525
set => SetAttributeProperty ("rows", value);
2626
}
2727

28-
int cols = 20;
2928
public int Columns {
3029
get => GetAttribute ("cols", 20);
3130
set => SetAttributeProperty ("cols", value);

Ooui/WebSocketSession.cs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -115,50 +115,6 @@ public async Task RunAsync ()
115115
}
116116
}
117117

118-
void QueueStateMessagesLocked (EventTarget target)
119-
{
120-
if (target == null) return;
121-
var created = false;
122-
foreach (var m in target.StateMessages) {
123-
if (m.MessageType == MessageType.Create) {
124-
createdIds.Add (m.TargetId);
125-
created = true;
126-
}
127-
if (created) {
128-
QueueMessageLocked (m);
129-
}
130-
}
131-
}
132-
133-
void QueueMessageLocked (Message message)
134-
{
135-
//
136-
// Make sure all the referenced objects have been created
137-
//
138-
if (!createdIds.Contains (message.TargetId)) {
139-
QueueStateMessagesLocked (element.GetElementById (message.TargetId));
140-
}
141-
if (message.Value is EventTarget ve) {
142-
if (!createdIds.Contains (ve.Id)) {
143-
QueueStateMessagesLocked (ve);
144-
}
145-
}
146-
else if (message.Value is Array a) {
147-
for (var i = 0; i < a.Length; i++) {
148-
// Console.WriteLine ($"A{i} = {a.GetValue(i)}");
149-
if (a.GetValue (i) is EventTarget e && !createdIds.Contains (e.Id)) {
150-
QueueStateMessagesLocked (e);
151-
}
152-
}
153-
}
154-
155-
//
156-
// Add it to the queue
157-
//
158-
//Console.WriteLine ($"QM {message.MessageType} {message.TargetId} {message.Key} {message.Value}");
159-
queuedMessages.Add (message);
160-
}
161-
162118
protected override void QueueMessage (Message message)
163119
{
164120
base.QueueMessage (message);

0 commit comments

Comments
 (0)