Cleanup CategorizedPool.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Buffers;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cryville.Crtr.Event {
|
||||
internal class MotionCache {
|
||||
@@ -25,9 +26,12 @@ namespace Cryville.Crtr.Event {
|
||||
obj.Valid = false;
|
||||
}
|
||||
}
|
||||
readonly Dictionary<Identifier, ObjectPool<MotionCache>> m_buckets;
|
||||
protected override IReadOnlyDictionary<Identifier, ObjectPool<MotionCache>> Buckets { get { return m_buckets; } }
|
||||
public MotionCachePool() {
|
||||
m_buckets = new Dictionary<Identifier, ObjectPool<MotionCache>>(ChartPlayer.motionRegistry.Count);
|
||||
foreach (var reg in ChartPlayer.motionRegistry)
|
||||
Buckets.Add(reg.Key, new Bucket(reg.Key, 4096));
|
||||
m_buckets.Add(reg.Key, new Bucket(reg.Key, 4096));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user