Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Making Sonar happy
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroZshadow committed May 15, 2020
1 parent 41ffbf7 commit 90ff8fa
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Improbable.Gdk.Core;
using Improbable.Worker.CInterop;
using Improbable.Gdk.Subscriptions;
using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,26 +128,22 @@ public override void ResetValue(ISubscription subscription)
public abstract class CommandReceiverSubscriptionManagerBase<T> : SubscriptionManager<T>
where T : ICommandReceiver
{
private readonly ComponentUpdateSystem componentUpdateSystem;
private readonly EntityManager entityManager;

private Dictionary<EntityId, HashSet<Subscription<T>>> entityIdToReceiveSubscriptions;

private HashSet<EntityId> entitiesMatchingRequirements = new HashSet<EntityId>();
private HashSet<EntityId> entitiesNotMatchingRequirements = new HashSet<EntityId>();

private readonly uint componentId;
private readonly ComponentType componentType;
private readonly ComponentType componentAuthType;

protected CommandReceiverSubscriptionManagerBase(World world, uint componentId) : base(world)
{
this.componentId = componentId;
componentType = ComponentDatabase.Metaclasses[componentId].Data;
componentAuthType = ComponentDatabase.Metaclasses[componentId].Authority;

entityManager = world.EntityManager;
componentUpdateSystem = world.GetExistingSystem<ComponentUpdateSystem>();

var constraintSystem = world.GetExistingSystem<ComponentConstraintsCallbackSystem>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Improbable.Gdk.Subscriptions
public abstract class WriterSubscriptionManager<TComponent, TWriter> : SubscriptionManager<TWriter>
where TWriter : IRequireable where TComponent : ISpatialComponentData
{
private readonly ComponentUpdateSystem componentUpdateSystem;
private readonly EntityManager entityManager;
private Dictionary<EntityId, HashSet<Subscription<TWriter>>> entityIdToWriterSubscriptions;

Expand All @@ -23,7 +22,6 @@ public abstract class WriterSubscriptionManager<TComponent, TWriter> : Subscript
protected WriterSubscriptionManager(World world) : base(world)
{
entityManager = World.EntityManager;
componentUpdateSystem = world.GetExistingSystem<ComponentUpdateSystem>();

RegisterComponentCallbacks();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public class EntitySystem : ComponentSystem

private ProfilerMarker applyDiffMarker = new ProfilerMarker("EntitySystem.ApplyDiff");

private WorkerSystem workerSystem;

public List<EntityId> GetEntitiesAdded()
{
return entitiesAdded;
Expand Down Expand Up @@ -47,13 +45,6 @@ internal void ApplyDiff(ViewDiff diff)
}
}

protected override void OnCreate()
{
base.OnCreate();

workerSystem = World.GetExistingSystem<WorkerSystem>();
}

protected override void OnUpdate()
{
entitiesAdded.Clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ internal class GameObjectInitializationSystem : ComponentSystem

private readonly GameObject workerGameObject;

private EntitySystem entitySystem;

private EntityQuery newEntitiesQuery;
private EntityQuery removedEntitiesQuery;

Expand All @@ -38,8 +36,6 @@ protected override void OnCreate()
{
base.OnCreate();

entitySystem = World.GetExistingSystem<EntitySystem>();

Linker = new EntityGameObjectLinker(World);

if (workerGameObject != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.Generic;
using Improbable.Gdk.Core;
using Improbable.Gdk.Subscriptions;
using Improbable.Worker.CInterop;
using Unity.Collections;
using Unity.Entities;
using UnityEngine;
Expand Down

0 comments on commit 90ff8fa

Please sign in to comment.