Browse Source

Minor cleanup.

* Replaced a stray int with var.
    * Reordered some using directives.
    * Removed some unused using directives.
improved_timing
Ian Burgmyer 6 years ago
parent
commit
3fff92d2ff
  1. 3
      DotSDL/Events/EventHandler.cs
  2. 4
      DotSDL/Graphics/Canvas.cs
  3. 2
      DotSDL/Graphics/SdlWindow.cs
  4. 2
      Samples/Sample.Audio/Window.cs

3
DotSDL/Events/EventHandler.cs

@ -47,8 +47,7 @@ namespace DotSDL.Events {
while(SdlEvents.PollEvent(ref inEvent) != 0) {
var newEvent = ConvertEvent(inEvent);
if(newEvent is null) continue;
if(newEvent.Resource != null)
if(newEvent?.Resource != null)
EventDispatcher.Dispatch(newEvent);
}
}

4
DotSDL/Graphics/Canvas.cs

@ -1,6 +1,4 @@
using System;
namespace DotSDL.Graphics {
namespace DotSDL.Graphics {
/// <summary>
/// A representation of the contents of the SDL window, with a number of
/// helper routines.

2
DotSDL/Graphics/SdlWindow.cs

@ -1,7 +1,7 @@
using DotSDL.Events;
using DotSDL.Input;
using DotSDL.Sdl;
using System;
using DotSDL.Input;
namespace DotSDL.Graphics {
/// <summary>

2
Samples/Sample.Audio/Window.cs

@ -80,7 +80,7 @@ namespace Sample.Audio {
// Number
var freqText = _freq.ToString();
var textPos = 5 - freqText.Length;
for(int x = 0; x < freqText.Length; x++)
for(var x = 0; x < freqText.Length; x++)
DrawGlyph(ref canvas, freqText[x], textPos + x, _textColor);
// Background/highlighting.

Loading…
Cancel
Save