mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-04 12:14:19 +01:00
Global: simplifies code with __auto_type
This commit is contained in:
@@ -152,7 +152,7 @@ static bool detectPhysicalDisk(const wchar_t* szDevice, FFlist* result, FFPhysic
|
||||
// DiskInfo and RemovableDiskInfo have the same structures. TapeInfo doesn't.
|
||||
if (gmt->DeviceType != FILE_DEVICE_TAPE)
|
||||
{
|
||||
__typeof__(gmt->MediaInfo[0].DeviceSpecific.DiskInfo)* diskInfo = &gmt->MediaInfo[0].DeviceSpecific.DiskInfo;
|
||||
__auto_type diskInfo = &gmt->MediaInfo[0].DeviceSpecific.DiskInfo;
|
||||
if (diskInfo->MediaCharacteristics & MEDIA_READ_ONLY)
|
||||
device->type |= FF_PHYSICALDISK_TYPE_READONLY;
|
||||
else if (diskInfo->MediaCharacteristics & MEDIA_READ_WRITE)
|
||||
@@ -162,7 +162,7 @@ static bool detectPhysicalDisk(const wchar_t* szDevice, FFlist* result, FFPhysic
|
||||
}
|
||||
else
|
||||
{
|
||||
__typeof__(gmt->MediaInfo[0].DeviceSpecific.TapeInfo)* tapeInfo = &gmt->MediaInfo[0].DeviceSpecific.TapeInfo;
|
||||
__auto_type tapeInfo = &gmt->MediaInfo[0].DeviceSpecific.TapeInfo;
|
||||
if (tapeInfo->MediaCharacteristics & MEDIA_READ_ONLY)
|
||||
device->type |= FF_PHYSICALDISK_TYPE_READONLY;
|
||||
else if (tapeInfo->MediaCharacteristics & MEDIA_READ_WRITE)
|
||||
|
||||
Reference in New Issue
Block a user