Procházet zdrojové kódy

Not using global instance to call class methods

(cherry picked from commit 1b907851232de5b97f9e1e4584e60ed6fe867b4d)

Source commit: e8490f2c5649e33f25b5d0b251566423169dd200
Martin Prikryl před 3 roky
rodič
revize
b0978df62b
1 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 6 6
      source/packages/filemng/IEDriveInfo.pas

+ 6 - 6
source/packages/filemng/IEDriveInfo.pas

@@ -162,17 +162,17 @@ begin
   for Drive := SystemDrive to LastDrive do
     if Get(Drive).Valid and
        (Get(Drive).DriveType = DRIVE_FIXED) and
-       DirectoryExists(ApiPath(DriveInfo.GetDriveRoot(Drive))) then
+       DirectoryExists(ApiPath(GetDriveRoot(Drive))) then
     begin
-      Result := DriveInfo.GetDriveRoot(Drive);
+      Result := GetDriveRoot(Drive);
       Exit;
     end;
   for Drive := SystemDrive to LastDrive do
     if Get(Drive).Valid and
        (Get(Drive).DriveType = DRIVE_REMOTE) and
-       DirectoryExists(ApiPath(DriveInfo.GetDriveRoot(Drive))) then
+       DirectoryExists(ApiPath(GetDriveRoot(Drive))) then
     begin
-      Result := DriveInfo.GetDriveRoot(Drive);
+      Result := GetDriveRoot(Drive);
       Exit;
     end;
   raise Exception.Create(SNoValidPath);
@@ -285,7 +285,7 @@ begin
   Assert(FData.ContainsKey(Drive));
   with FData[Drive] do
   begin
-    DriveType := Windows.GetDriveType(PChar(DriveInfo.GetDriveRoot(Drive)));
+    DriveType := Windows.GetDriveType(PChar(GetDriveRoot(Drive)));
     Valid :=
       ((not IsRealDrive(Drive)) or (not FHonorDrivePolicy) or (not Bool((1 shl (Ord(Drive[1]) - 65)) and FNoDrives))) and
       (DriveType in [DRIVE_REMOVABLE, DRIVE_FIXED, DRIVE_CDROM, DRIVE_RAMDISK, DRIVE_REMOTE]);
@@ -420,7 +420,7 @@ begin
   if not Assigned(FDesktop) then
     SHGetDesktopFolder(FDesktop);
 
-  DriveRoot := DriveInfo.GetDriveRoot(Drive);
+  DriveRoot := GetDriveRoot(Drive);
 
   // When this method is called, the entry always exists already
   Assert(FData.ContainsKey(Drive));