Refactored some of the hardware monitoring code and fixed a few code inspection warnings.

This commit is contained in:
Michael Möller
2010-09-21 20:32:36 +00:00
parent dfb06376d6
commit bcde768e25
44 changed files with 437 additions and 472 deletions
+1 -5
View File
@@ -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))
+1 -2
View File
@@ -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;