Code cleanup.

This commit is contained in:
2023-01-08 16:27:02 +08:00
parent a7baef2c9d
commit 0a1e512f41
2 changed files with 4 additions and 4 deletions

View File

@@ -24,6 +24,10 @@ namespace Cryville.Crtr {
SetIdle();
}
catch (ResultException) {
if (dc != null) {
dc.Dispose();
dc = null;
}
Logger.Log("main", 3, "Discord", "Cannot connect to Discord");
}
}

View File

@@ -67,7 +67,6 @@ namespace Cryville.Crtr.Event {
var batch = GetEventBatch();
Time = etime;
beat = ebeat;
bool flag = false;
foreach (var ev in batch) {
EventContainer con = null;
if (table.ContainsKey(ev)) con = table[ev].Container;
@@ -83,9 +82,6 @@ namespace Cryville.Crtr.Event {
sev.Origin = pev;
}
stampedEvents.Add(sev);
if (ev.Priority >= 0) {
flag = true;
}
if (ev is Chart.Signature) {
var tev = (Chart.Signature)ev;
if (tev.tempo != null) tempo = (float)tev.tempo;