aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Pools/ObjectPool.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-07-01 21:39:22 -0500
committerAc_K <Acoustik666@gmail.com>2019-07-02 04:39:22 +0200
commitb2b736abc2569ab5d8199da666aef8d8394844a0 (patch)
tree88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.Common/Pools/ObjectPool.cs
parent10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff)
Misc cleanup (#708)
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.Common/Pools/ObjectPool.cs')
-rw-r--r--Ryujinx.Common/Pools/ObjectPool.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Common/Pools/ObjectPool.cs b/Ryujinx.Common/Pools/ObjectPool.cs
index dba671bb..e0bf5df6 100644
--- a/Ryujinx.Common/Pools/ObjectPool.cs
+++ b/Ryujinx.Common/Pools/ObjectPool.cs
@@ -19,7 +19,7 @@ namespace Ryujinx.Common
public T Allocate()
{
- var instance = _firstItem;
+ T instance = _firstItem;
if (instance == null || instance != Interlocked.CompareExchange(ref _firstItem, null, instance))
{
@@ -31,11 +31,11 @@ namespace Ryujinx.Common
private T AllocateInternal()
{
- var items = _items;
+ T[] items = _items;
for (int i = 0; i < items.Length; i++)
{
- var instance = items[i];
+ T instance = items[i];
if (instance != null && instance == Interlocked.CompareExchange(ref items[i], null, instance))
{
@@ -60,7 +60,7 @@ namespace Ryujinx.Common
private void ReleaseInternal(T obj)
{
- var items = _items;
+ T[] items = _items;
for (int i = 0; i < items.Length; i++)
{