Refactored some of the hardware monitoring code and fixed a few code inspection warnings.
This commit is contained in:
@@ -35,18 +35,14 @@
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenHardwareMonitor.Collections {
|
||||
|
||||
public class ListSet<T> : IEnumerable<T> {
|
||||
|
||||
private List<T> list = new List<T>();
|
||||
|
||||
public ListSet() { }
|
||||
private readonly List<T> list = new List<T>();
|
||||
|
||||
public bool Add(T item) {
|
||||
if (list.Contains(item))
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -43,7 +42,7 @@ namespace OpenHardwareMonitor.Collections {
|
||||
|
||||
public class ReadOnlyArray<T> : IReadOnlyArray<T> {
|
||||
|
||||
private T[] array;
|
||||
private readonly T[] array;
|
||||
|
||||
public ReadOnlyArray(T[] array) {
|
||||
this.array = array;
|
||||
|
||||
Reference in New Issue
Block a user