mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Code cleanup
This commit is contained in:
parent
ada207fb11
commit
d7245a638a
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using IniParser;
|
||||
@ -16,7 +15,7 @@ namespace Wabbajack.Common
|
||||
|
||||
public DynamicIniData(IniData value) //
|
||||
{
|
||||
this._value = value;
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public static dynamic FromIni(IniData data)
|
||||
@ -49,7 +48,7 @@ namespace Wabbajack.Common
|
||||
public override bool TryGetMember(GetMemberBinder binder, out object result)
|
||||
{
|
||||
result = _coll[binder.Name];
|
||||
if (result is string) result = Interpret((string)result);
|
||||
if (result is string s) result = Interpret(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -70,7 +69,7 @@ namespace Wabbajack.Common
|
||||
|
||||
private static string UnescapeUTF8(string s)
|
||||
{
|
||||
List<byte> acc = new List<byte>();
|
||||
var acc = new List<byte>();
|
||||
for (var i = 0; i < s.Length; i++)
|
||||
{
|
||||
var c = s[i];
|
||||
@ -110,7 +109,7 @@ namespace Wabbajack.Common
|
||||
}
|
||||
|
||||
result = _coll[(string) indexes[0]];
|
||||
if (result is string) result = Regex.Unescape(((string)result).Trim('"'));
|
||||
if (result is string s) result = Regex.Unescape(s.Trim('"'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user