Skip to content

Commit

Permalink
Maintenance: clean up some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
uxmal committed Aug 8, 2023
1 parent 723e338 commit 991aac8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Gui/TextViewing/AbstractProcedureCodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract class AbstractProcedureCodeModel : ITextViewModel
private readonly Procedure proc;
private int position;
private LineSpan[]? lines; // The procedure, rendered into line spans
private int numLines;
private readonly int numLines;
private readonly ISelectedAddressService selSvc;

public AbstractProcedureCodeModel(Procedure proc, ISelectedAddressService selSvc)
Expand Down Expand Up @@ -65,7 +65,7 @@ public LineSpan[] GetLineSpans(int count)
int p = (int)position;
int c = Math.Min(count, LineCount - p);
if (c <= 0)
return new LineSpan[0];
return Array.Empty<LineSpan>();
var spans = new LineSpan[c];
for (int i = 0; i < c; ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/TextViewing/AbstractTextSpanFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private StringBuilder EnsureSpan()

private class TextSpanModel : ITextViewModel
{
private LineSpan[] lines;
private readonly LineSpan[] lines;
private int position;

public TextSpanModel(LineSpan[] lines)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
#endregion

using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Data;
using Avalonia.Markup.Xaml;
using AvaloniaEdit.Utils;
using Reko.Gui;
using Reko.UserInterfaces.AvaloniaUI.ViewModels.Tools;
using System;
using System.Collections;
using System.Collections.Generic;

namespace Reko.UserInterfaces.AvaloniaUI.Views.Tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public IKeyBindingsDialog CreateKeyBindingsDialog(Dictionary<string, Dictionary<
return dlg;
}

public IDialog<LoadDetails?> CreateOpenAsDialog(string initialFilename)
public IDialog<LoadDetails> CreateOpenAsDialog(string initialFilename)
{
var dlg = new OpenAsDialog
{
Expand Down

0 comments on commit 991aac8

Please sign in to comment.