Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
praeclarum committed Mar 14, 2018
1 parent 1473bb6 commit bbf7d35
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 49 deletions.
1 change: 0 additions & 1 deletion Ooui/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace Ooui
{
public class Button : FormControl
{
ButtonType typ = ButtonType.Submit;
public ButtonType Type {
get => GetAttribute ("type", ButtonType.Submit);
set => SetAttributeProperty ("type", value);
Expand Down
1 change: 0 additions & 1 deletion Ooui/Element.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public string Title {
set => SetAttributeProperty ("title", value);
}

bool hidden = false;
public bool IsHidden {
get => GetBooleanAttribute ("hidden");
set => SetBooleanAttributeProperty ("hidden", value);
Expand Down
1 change: 0 additions & 1 deletion Ooui/Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace Ooui
{
public class Form : Element
{
string action = "";
public string Action {
get => GetStringAttribute ("action", "");
set => SetAttributeProperty ("action", value ?? "");
Expand Down
1 change: 0 additions & 1 deletion Ooui/FormControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public string Name {
set => SetAttributeProperty ("name", value);
}

bool isDisabled = false;
public bool IsDisabled {
get => GetBooleanAttribute ("disabled");
set => SetBooleanAttributeProperty ("disabled", value);
Expand Down
1 change: 1 addition & 0 deletions Ooui/Ooui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion Ooui/TextArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public int Rows {
set => SetAttributeProperty ("rows", value);
}

int cols = 20;
public int Columns {
get => GetAttribute ("cols", 20);
set => SetAttributeProperty ("cols", value);
Expand Down
44 changes: 0 additions & 44 deletions Ooui/WebSocketSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,50 +115,6 @@ public async Task RunAsync ()
}
}

void QueueStateMessagesLocked (EventTarget target)
{
if (target == null) return;
var created = false;
foreach (var m in target.StateMessages) {
if (m.MessageType == MessageType.Create) {
createdIds.Add (m.TargetId);
created = true;
}
if (created) {
QueueMessageLocked (m);
}
}
}

void QueueMessageLocked (Message message)
{
//
// Make sure all the referenced objects have been created
//
if (!createdIds.Contains (message.TargetId)) {
QueueStateMessagesLocked (element.GetElementById (message.TargetId));
}
if (message.Value is EventTarget ve) {
if (!createdIds.Contains (ve.Id)) {
QueueStateMessagesLocked (ve);
}
}
else if (message.Value is Array a) {
for (var i = 0; i < a.Length; i++) {
// Console.WriteLine ($"A{i} = {a.GetValue(i)}");
if (a.GetValue (i) is EventTarget e && !createdIds.Contains (e.Id)) {
QueueStateMessagesLocked (e);
}
}
}

//
// Add it to the queue
//
//Console.WriteLine ($"QM {message.MessageType} {message.TargetId} {message.Key} {message.Value}");
queuedMessages.Add (message);
}

protected override void QueueMessage (Message message)
{
base.QueueMessage (message);
Expand Down

0 comments on commit bbf7d35

Please # to comment.