Code cleanup.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
return new T[_size];
|
||||
}
|
||||
}
|
||||
Bucket[] _buckets;
|
||||
readonly Bucket[] _buckets;
|
||||
/// <summary>
|
||||
/// Creates an instance of the <see cref="ArrayPool{T}" /> class with the default maximum list size and bucket capacity.
|
||||
/// </summary>
|
||||
|
@@ -15,7 +15,7 @@ namespace Cryville.Common.Buffers {
|
||||
return new List<T>(_size);
|
||||
}
|
||||
}
|
||||
Bucket[] _buckets;
|
||||
readonly Bucket[] _buckets;
|
||||
/// <summary>
|
||||
/// Creates an instance of the <see cref="ListPool{T}" /> class with the default maximum list size and bucket capacity.
|
||||
/// </summary>
|
||||
|
@@ -21,8 +21,9 @@ namespace Cryville.Common {
|
||||
public static void Create(string key, Logger logger) {
|
||||
Instances[key] = logger;
|
||||
if (logPath != null) {
|
||||
Files[key] = new StreamWriter(logPath + "/" + ((int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString() + "-" + key + ".log");
|
||||
Files[key].AutoFlush = true;
|
||||
Files[key] = new StreamWriter(logPath + "/" + ((int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString() + "-" + key + ".log") {
|
||||
AutoFlush = true
|
||||
};
|
||||
}
|
||||
}
|
||||
public static void Close() {
|
||||
|
@@ -127,7 +127,6 @@ namespace Cryville.Common.Pdt {
|
||||
/// <returns>An operator of the specific name.</returns>
|
||||
/// <remarks>The parameter count of the returned operator does not necessarily equal to <paramref name="pc" />.</remarks>
|
||||
protected abstract PdtOperator GetOperator(string name, int pc);
|
||||
bool _failure;
|
||||
unsafe void Operate(PdtOperator op, int pc, bool noset = false) {
|
||||
fixed (byte* pmem = _mem) {
|
||||
op.Begin(this);
|
||||
|
@@ -1,13 +1,11 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Cryville.Common.Pdt {
|
||||
/// <summary>
|
||||
/// Span on the memory of a <see cref="PdtEvaluatorBase" />.
|
||||
/// </summary>
|
||||
public unsafe struct PdtVariableMemory {
|
||||
byte* _ptr;
|
||||
readonly byte* _ptr;
|
||||
/// <summary>
|
||||
/// The length of the span.
|
||||
/// </summary>
|
||||
|
@@ -17,11 +17,9 @@ namespace Cryville.Common.Unity.UI {
|
||||
set { m_targetValue = value; }
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0051
|
||||
protected override void Update() {
|
||||
base.value = (base.value - m_targetValue) * m_smooth + m_targetValue;
|
||||
base.Update();
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user