Browse Source

Small cleanups and fixups

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
b664fe694d
3 changed files with 7 additions and 2 deletions
  1. +1
    -1
      IPA.Loader/Logging/Logger.cs
  2. +1
    -1
      IPA.Loader/Logging/StandardLogger.cs
  3. +5
    -0
      IPA.Loader/Utilities/Utils.cs

+ 1
- 1
IPA.Loader/Logging/Logger.cs View File

@ -171,7 +171,7 @@ namespace IPA.Logging
/// <summary> /// <summary>
/// Used for when the level is undefined. /// Used for when the level is undefined.
/// </summary> /// </summary>
Undefined = Byte.MaxValue
Undefined = byte.MaxValue
} }
/// <summary> /// <summary>


+ 1
- 1
IPA.Loader/Logging/StandardLogger.cs View File

@ -128,7 +128,7 @@ namespace IPA.Logging
logName = $"{parent.logName}/{subName}"; logName = $"{parent.logName}/{subName}";
this.parent = parent; this.parent = parent;
printers = new List<LogPrinter>(); printers = new List<LogPrinter>();
if (SelfConfig.Debug_.CondenseModLogs_)
if (!SelfConfig.Debug_.CondenseModLogs_)
printers.Add(new PluginSubLogPrinter(parent.logName, subName)); printers.Add(new PluginSubLogPrinter(parent.logName, subName));
if (logThread == null || !logThread.IsAlive) if (logThread == null || !logThread.IsAlive)


+ 5
- 0
IPA.Loader/Utilities/Utils.cs View File

@ -4,6 +4,7 @@ using System.Text;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Mono.Cecil; using Mono.Cecil;
using System.Runtime.CompilerServices;
#if NET3 #if NET3
using File = Net3_Proxy.File; using File = Net3_Proxy.File;
#endif #endif
@ -197,11 +198,15 @@ namespace IPA.Utilities
} }
#if NET4 #if NET4
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static IEnumerable<string> StrJP(this IEnumerable<string> a) => a; internal static IEnumerable<string> StrJP(this IEnumerable<string> a) => a;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static IEnumerable<string> StrJP<T>(this IEnumerable<T> a) => a.Select(o => $"{o}" /* safer than .ToString() */); internal static IEnumerable<string> StrJP<T>(this IEnumerable<T> a) => a.Select(o => $"{o}" /* safer than .ToString() */);
#endif #endif
#if NET3 #if NET3
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static string[] StrJP(this IEnumerable<string> a) => a.ToArray(); internal static string[] StrJP(this IEnumerable<string> a) => a.ToArray();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static string[] StrJP<T>(this IEnumerable<T> a) => a.Select(o => $"{o}" /* safer than .ToString() */).ToArray(); internal static string[] StrJP<T>(this IEnumerable<T> a) => a.Select(o => $"{o}" /* safer than .ToString() */).ToArray();
#endif #endif
} }


Loading…
Cancel
Save