Enforce var style more
This commit is contained in:
parent
c21d791063
commit
2a017ee676
9 changed files with 14 additions and 14 deletions
|
@ -206,7 +206,7 @@ namespace Ryujinx.Audio
|
|||
return defaultAudioDevice;
|
||||
}
|
||||
|
||||
for(var i = 0; i < audioContext.BackendCount; i++)
|
||||
for(int i = 0; i < audioContext.BackendCount; i++)
|
||||
{
|
||||
SoundIODevice audioDevice = audioContext.GetOutputDevice(i);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Ryujinx.Common
|
|||
|
||||
public T Allocate()
|
||||
{
|
||||
var instance = _firstItem;
|
||||
T instance = _firstItem;
|
||||
|
||||
if (instance == null || instance != Interlocked.CompareExchange(ref _firstItem, null, instance))
|
||||
{
|
||||
|
@ -31,11 +31,11 @@ namespace Ryujinx.Common
|
|||
|
||||
private T AllocateInternal()
|
||||
{
|
||||
var items = _items;
|
||||
T[] items = _items;
|
||||
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
var instance = items[i];
|
||||
T instance = items[i];
|
||||
|
||||
if (instance != null && instance == Interlocked.CompareExchange(ref items[i], null, instance))
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ namespace Ryujinx.Common
|
|||
|
||||
private void ReleaseInternal(T obj)
|
||||
{
|
||||
var items = _items;
|
||||
T[] items = _items;
|
||||
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
|
|
|
@ -92,9 +92,9 @@ namespace Ryujinx.Profiler
|
|||
{
|
||||
int count = 0;
|
||||
|
||||
while (_timerQueue.TryDequeue(out var item))
|
||||
while (_timerQueue.TryDequeue(out TimerQueueValue item))
|
||||
{
|
||||
if (!Timers.TryGetValue(item.Config, out var value))
|
||||
if (!Timers.TryGetValue(item.Config, out TimingInfo value))
|
||||
{
|
||||
value = new TimingInfo();
|
||||
Timers.Add(item.Config, value);
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace Ryujinx.Profiler
|
|||
return default(T);
|
||||
}
|
||||
|
||||
var enumName = formatterResolver.GetFormatterWithVerify<string>()
|
||||
string enumName = formatterResolver.GetFormatterWithVerify<string>()
|
||||
.Deserialize(ref reader, formatterResolver);
|
||||
|
||||
if (Enum.TryParse<T>(enumName, out T result))
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Ryujinx.Profiler
|
|||
_timestamps.Add(_currentTimestamp);
|
||||
}
|
||||
|
||||
var delta = _currentTimestamp.EndTime - _currentTimestamp.BeginTime;
|
||||
long delta = _currentTimestamp.EndTime - _currentTimestamp.BeginTime;
|
||||
TotalTime += delta;
|
||||
Instant += delta;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Ryujinx.Profiler.UI
|
|||
float barHeight = (LineHeight - LinePadding) / 3.0f;
|
||||
|
||||
// Get max values
|
||||
var maxInstant = maxAverage = maxTotal = 0;
|
||||
long maxInstant = maxAverage = maxTotal = 0;
|
||||
foreach (KeyValuePair<ProfileConfig, TimingInfo> kvp in _sortedProfileData)
|
||||
{
|
||||
maxInstant = Math.Max(maxInstant, kvp.Value.Instant);
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers
|
|||
// Update raw data for each character
|
||||
for (int i = 0; i < 94; i++)
|
||||
{
|
||||
var surface = RenderSurface((char)(i + 33), font, out var xBearing, out var yBearing, out var advance);
|
||||
var surface = RenderSurface((char)(i + 33), font, out float xBearing, out float yBearing, out float advance);
|
||||
|
||||
characters[i] = UpdateTexture(surface, ref rawCharacterSheet, ref x, ref y, ref lineOffset);
|
||||
characters[i].BearingX = xBearing;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Ryujinx.Tests.Unicorn.Native
|
|||
|
||||
public static void MarshalArrayOf<T>(IntPtr input, int length, out T[] output)
|
||||
{
|
||||
var size = Marshal.SizeOf(typeof(T));
|
||||
int size = Marshal.SizeOf(typeof(T));
|
||||
output = new T[length];
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
|
|
|
@ -274,8 +274,8 @@ namespace Ryujinx
|
|||
return default(T);
|
||||
}
|
||||
|
||||
var enumName = formatterResolver.GetFormatterWithVerify<string>()
|
||||
.Deserialize(ref reader, formatterResolver);
|
||||
string enumName = formatterResolver.GetFormatterWithVerify<string>()
|
||||
.Deserialize(ref reader, formatterResolver);
|
||||
|
||||
if(Enum.TryParse<T>(enumName, out T result))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue