made function efficient, and removed pointless semicolon
This commit is contained in:
parent
6a52d6b8aa
commit
d206ce3bf8
1 changed files with 2 additions and 6 deletions
|
@ -92,11 +92,7 @@ namespace Saviour_Backup_System
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int countDrives() {
|
public static int countDrives() { return getConnectedDrives().Length; }
|
||||||
int numberofDrives = 0;
|
|
||||||
foreach (DriveInfo drive in getConnectedDrives()) { numberofDrives++; }
|
|
||||||
return numberofDrives;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static int spacePercentage(DriveInfo drive) {
|
public static int spacePercentage(DriveInfo drive) {
|
||||||
|
@ -107,7 +103,7 @@ namespace Saviour_Backup_System
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string calculateDriveID(DriveInfo drive) {
|
public static string calculateDriveID(DriveInfo drive) {
|
||||||
return tools.hash(drive.VolumeLabel + drive.TotalSize + drive.DriveFormat + USBTools.getDriveType(drive)); ;
|
return tools.hash(drive.VolumeLabel + drive.TotalSize + drive.DriveFormat + USBTools.getDriveType(drive));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue