vars and target-typed new

This commit is contained in:
Kwoth
2021-12-20 00:15:39 +01:00
parent ee33313519
commit cd379fd308
75 changed files with 198 additions and 198 deletions

View File

@@ -106,7 +106,7 @@ public sealed class MusicPlayer : IMusicPlayer
{
// wait until a song is available in the queue
// or until the queue is resumed
var track = _queue.GetCurrent(out int index);
var track = _queue.GetCurrent(out var index);
if (track is null || IsStopped)
{

View File

@@ -85,7 +85,7 @@ public sealed partial class MusicQueue : IMusicQueue
return Enqueue(trackInfo, queuer, out index);
}
LinkedListNode<QueuedTrackInfo> currentNode = _tracks.First!;
var currentNode = _tracks.First!;
int i;
for (i = 1; i <= _index; i++)
{

View File

@@ -280,7 +280,7 @@ public sealed partial class Music : NadekoModule<IMusicService>
IEmbedBuilder printAction(int curPage)
{
string desc = string.Empty;
var desc = string.Empty;
var current = mp.GetCurrentTrack(out var currentIndex);
if (current is not null)
{
@@ -288,7 +288,7 @@ public sealed partial class Music : NadekoModule<IMusicService>
}
var repeatType = mp.Repeat;
var add = "";
var add = string.Empty;
if (mp.IsStopped)
add += Format.Bold(GetText(strs.queue_stopped(Format.Code(Prefix + "play")))) + "\n";
// var mps = mp.MaxPlaytimeSeconds;