diff -r fbf22ccd9d6f -r 0ee888c485d5 Hardware/Nvidia/NvidiaGroup.cs --- a/Hardware/Nvidia/NvidiaGroup.cs Tue Sep 21 10:33:28 2010 +0000 +++ b/Hardware/Nvidia/NvidiaGroup.cs Tue Sep 21 20:32:36 2010 +0000 @@ -43,8 +43,8 @@ internal class NvidiaGroup : IGroup { - private List hardware = new List(); - private StringBuilder report = new StringBuilder(); + private readonly List hardware = new List(); + private readonly StringBuilder report = new StringBuilder(); public NvidiaGroup(ISettings settings) { if (!NVAPI.IsAvailable) @@ -69,7 +69,7 @@ } else { NvStatus status = NVAPI.NvAPI_EnumPhysicalGPUs(handles, out count); if (status != NvStatus.OK) { - report.AppendLine("Status: " + status.ToString()); + report.AppendLine("Status: " + status); report.AppendLine(); return; } @@ -104,14 +104,12 @@ } report.Append("Number of GPUs: "); - report.AppendLine(count.ToString(CultureInfo.InvariantCulture)); - - for (int i = 0; i < count; i++) { + report.AppendLine(count.ToString(CultureInfo.InvariantCulture)); + + for (int i = 0; i < count; i++) { NvDisplayHandle displayHandle; - if (displayHandles.TryGetValue(handles[i], out displayHandle)) - hardware.Add(new NvidiaGPU(i, handles[i], displayHandle, settings)); - else - hardware.Add(new NvidiaGPU(i, handles[i], null, settings)); + displayHandles.TryGetValue(handles[i], out displayHandle); + hardware.Add(new NvidiaGPU(i, handles[i], displayHandle, settings)); } report.AppendLine();