mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-09 00:36:28 +02:00
misc: chore: Use explicit types in common project
This commit is contained in:
parent
97188556d8
commit
a97fd4beb1
15 changed files with 59 additions and 56 deletions
|
@ -41,7 +41,7 @@ namespace Ryujinx.Common.Logging.Formatters
|
|||
|
||||
sb.Append('{');
|
||||
|
||||
foreach (var prop in props)
|
||||
foreach (PropertyInfo prop in props)
|
||||
{
|
||||
sb.Append(prop.Name);
|
||||
sb.Append(": ");
|
||||
|
@ -52,7 +52,7 @@ namespace Ryujinx.Common.Logging.Formatters
|
|||
|
||||
if (array is not null)
|
||||
{
|
||||
foreach (var item in array)
|
||||
foreach (object? item in array)
|
||||
{
|
||||
sb.Append(item);
|
||||
sb.Append(", ");
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace Ryujinx.Common.Logging
|
|||
|
||||
_stdErrAdapter.Dispose();
|
||||
|
||||
foreach (var target in _logTargets)
|
||||
foreach (ILogTarget target in _logTargets)
|
||||
{
|
||||
target.Dispose();
|
||||
}
|
||||
|
@ -203,9 +203,9 @@ namespace Ryujinx.Common.Logging
|
|||
|
||||
public static IReadOnlyCollection<LogLevel> GetEnabledLevels()
|
||||
{
|
||||
var logs = new[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub, Trace };
|
||||
Log?[] logs = new[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub, Trace };
|
||||
List<LogLevel> levels = new(logs.Length);
|
||||
foreach (var log in logs)
|
||||
foreach (Log? log in logs)
|
||||
{
|
||||
if (log.HasValue)
|
||||
levels.Add(log.Value.Level);
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Ryujinx.Common.Logging.Targets
|
|||
|
||||
public void Log(object sender, LogEventArgs e)
|
||||
{
|
||||
var logEventArgsJson = LogEventArgsJson.FromLogEventArgs(e);
|
||||
LogEventArgsJson logEventArgsJson = LogEventArgsJson.FromLogEventArgs(e);
|
||||
JsonHelper.SerializeToStream(_stream, logEventArgsJson, LogEventJsonSerializerContext.Default.LogEventArgsJson);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue