Skip to content

Commit

Permalink
Convert bool to XBool.
Browse files Browse the repository at this point in the history
  • Loading branch information
jief666 committed Sep 28, 2021
1 parent 7b23e6b commit 83593a5
Show file tree
Hide file tree
Showing 143 changed files with 1,282 additions and 1,268 deletions.
2 changes: 2 additions & 0 deletions Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3334,6 +3334,7 @@
"-Wignored-qualifiers",
"-Wreorder",
"-Wmissing-braces",
"-Wnon-pod-varargs",
);
};
name = Debug;
Expand Down Expand Up @@ -3434,6 +3435,7 @@
"-Wignored-qualifiers",
"-Wreorder",
"-Wmissing-braces",
"-Wnon-pod-varargs",
);
};
name = Release;
Expand Down
6 changes: 3 additions & 3 deletions rEFIt_UEFI/Platform/AcpiPatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ void SaveOemTables()
// EFI_STATUS Status;
void *RsdPtr;
XStringW AcpiOriginPath = L"ACPI\\origin"_XSW;
XBool Saved = false;
XBool Saved = false;
CHAR8 *MemLogStart;
UINTN MemLogStartLen;

Expand Down Expand Up @@ -1716,8 +1716,8 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const MacOsVersion& OSVersion)
// UINTN ApicLen;
UINTN ApicCPUNum;
UINT8 *SubTable;
XBool DsdtLoaded = false;
XBool NeedUpdate = false;
XBool DsdtLoaded = false;
XBool NeedUpdate = false;
OPER_REGION *tmpRegion;
// XStringW AcpiOemPath = SWPrintf("%ls\\ACPI\\patched", OEMPath.wc_str());

Expand Down
6 changes: 3 additions & 3 deletions rEFIt_UEFI/Platform/BdsConnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ EFI_STATUS BdsLibConnectMostlyAllEfi()
EFI_HANDLE *HandleBuffer = NULL;
UINT32 *HandleType = NULL;
UINTN HandleIndex;
XBool Parent;
XBool Device;
XBool Parent;
XBool Device;
EFI_PCI_IO_PROTOCOL* PciIo = NULL;
PCI_TYPE00 Pci;

Expand Down Expand Up @@ -552,7 +552,7 @@ BdsLibConnectUsbDevByShortFormDP(
UINTN Index;
EFI_PCI_IO_PROTOCOL *PciIo;
UINT8 Class[3];
XBool AtLeastOneConnected;
XBool AtLeastOneConnected;

//
// Check the passed in parameters
Expand Down
20 changes: 10 additions & 10 deletions rEFIt_UEFI/Platform/BootOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Clover_FindDevicePathNodeWithType (
*/
EFI_STATUS
CreateBootOptionDevicePath (
IN EFI_HANDLE FileDeviceHandle,
IN EFI_HANDLE FileDeviceHandle,
IN CONST XStringW& FileName,
IN XBool UseShortForm,
IN XBool UseShortForm,
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
{
Expand Down Expand Up @@ -226,7 +226,7 @@ DevicePathEqual (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2
)
{
XBool Equal;
XBool Equal;
UINT8 Type1;
UINT8 SubType1;
UINTN Len1;
Expand Down Expand Up @@ -831,7 +831,7 @@ FindBootOptionForFile (
/** Prints BootXXXX vars found listed in BootOrder, plus print others if AllBootOptions == true. */
void
PrintBootOptions (
IN XBool AllBootOptions
IN XBool AllBootOptions
)
{
EFI_STATUS Status;
Expand All @@ -840,7 +840,7 @@ PrintBootOptions (
UINTN Index;
UINTN BootNum;
BO_BOOT_OPTION BootOption;
XBool FoundOthers;
XBool FoundOthers;


DBG("\nBoot options:\n-------------\n");
Expand Down Expand Up @@ -997,13 +997,13 @@ AddBootOption (
*/
EFI_STATUS
AddBootOptionForFile (
IN EFI_HANDLE FileDeviceHandle,
IN EFI_HANDLE FileDeviceHandle,
IN CONST XStringW& FileName,
IN XBool UseShortForm,
IN CONST CHAR16 *Description,
IN XBool UseShortForm,
IN CONST CHAR16 *Description,
IN UINT8 *OptionalData,
IN UINTN OptionalDataSize,
IN UINTN BootIndex,
IN UINTN OptionalDataSize,
IN UINTN BootIndex,
OUT UINT16 *BootNum
)
{
Expand Down
14 changes: 7 additions & 7 deletions rEFIt_UEFI/Platform/BootOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ FindBootOptionForFile (
*/
EFI_STATUS
AddBootOptionForFile (
IN EFI_HANDLE FileDeviceHandle,
IN EFI_HANDLE FileDeviceHandle,
IN CONST XStringW &FileName,
IN XBool UseShortForm,
IN CONST CHAR16 *Description,
IN UINT8 *OptionalData,
IN UINTN OptionalDataSize,
IN UINTN BootIndex,
OUT UINT16 *BootNum
IN XBool UseShortForm,
IN CONST CHAR16 *Description,
IN UINT8 *OptionalData,
IN UINTN OptionalDataSize,
IN UINTN BootIndex,
OUT UINT16 *BootNum
);

/** Deletes boot option specified with BootNum (XXXX in BootXXXX var name). */
Expand Down
4 changes: 2 additions & 2 deletions rEFIt_UEFI/Platform/DataHub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ GetNextDataRecord (
{
EFI_DATA_ENTRY *LogEntry;
LIST_ENTRY *Link;
XBool ReturnFirstEntry;
XBool ReturnFirstEntry;
EFI_DATA_RECORD_HEADER *Record;
EFI_DATA_ENTRY *NextLogEntry;

//
// If MonotonicCount == 0 just return the first one
//
ReturnFirstEntry = (XBool) (*PtrCurrentMTC == 0);
ReturnFirstEntry = *PtrCurrentMTC == 0;

Record = NULL;
for (Link = GetFirstNode(Head); Link != Head; Link = GetNextNode(Head, Link)) {
Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/DataHubCpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ SetupDataForOSX(XBool Hibernate)
UINT64 ARTFrequency;
UINTN Revision;
UINT16 Zero = 0;
XBool isRevLess = (ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[0] == 0 &&
XBool isRevLess = (ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[0] == 0 &&
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[1] == 0 &&
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[2] == 0 &&
ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[3] == 0 &&
Expand Down
16 changes: 8 additions & 8 deletions rEFIt_UEFI/Platform/FixBiosDsdt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ XBool GetName(UINT8 *dsdt, INT32 adr, OUT CHAR8* name, OUT INTN *shift)
XBool CmpAdr (UINT8 *dsdt, UINT32 j, UINT32 PciAdr)
{
// Name (_ADR, 0x001f0001)
return (XBool)
return
((dsdt[j + 4] == 0x08) &&
(dsdt[j + 5] == 0x5F) &&
(dsdt[j + 6] == 0x41) &&
Expand Down Expand Up @@ -1267,7 +1267,7 @@ XBool CmpPNP (UINT8 *dsdt, UINT32 j, UINT16 PNP)
{
// Name (_HID, EisaId ("PNP0C0F")) for PNP=0x0C0F BigEndian
if (PNP == 0) {
return (XBool)
return
((dsdt[j + 0] == 0x08) &&
(dsdt[j + 1] == 0x5F) &&
(dsdt[j + 2] == 0x48) &&
Expand All @@ -1277,7 +1277,7 @@ XBool CmpPNP (UINT8 *dsdt, UINT32 j, UINT16 PNP)
(dsdt[j + 6] == 0x41) &&
(dsdt[j + 7] == 0xD0));
}
return (XBool)
return
((dsdt[j + 0] == 0x08) &&
(dsdt[j + 1] == 0x5F) &&
(dsdt[j + 2] == 0x48) &&
Expand Down Expand Up @@ -4265,14 +4265,14 @@ UINT8 VenIDE[] = {0x86,0x80,0x00,0x00};

UINT32 FIXIDE (UINT8 *dsdt, UINT32 len)
{
UINT32 i, k;
UINT32 j;
UINT32 IDEADR = 0, BridgeSize = 0, Size;
INT32 sizeoffset;
UINT32 i, k;
UINT32 j;
UINT32 IDEADR = 0, BridgeSize = 0, Size;
INT32 sizeoffset;
AML_CHUNK *root;
AML_CHUNK *device;
CHAR8 *ide;
XBool PATAFIX=true;
XBool PATAFIX=true;
AML_CHUNK *met, *met2;
AML_CHUNK *pack;
AML_CHUNK *device1;
Expand Down
12 changes: 6 additions & 6 deletions rEFIt_UEFI/Platform/Hibernate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ STATIC CHAR16 OffsetHexStr[100];
XBool
IsOsxHibernated (IN LOADER_ENTRY *Entry)
{
EFI_STATUS Status = EFI_SUCCESS;
UINTN Size = 0;
EFI_STATUS Status = EFI_SUCCESS;
UINTN Size = 0;
UINT8 *Data = NULL;
// REFIT_VOLUME *ThisVolume = Entry->Volume;
REFIT_VOLUME *Volume = Entry->Volume;
EFI_GUID *BootGUID = NULL;
XBool ret = false;
XBool ret = false;
UINT8 *Value = NULL;

// UINTN VolumeIndex;
Expand Down Expand Up @@ -986,9 +986,9 @@ PrepareHibernation (IN REFIT_VOLUME *Volume)
UINT8 *VarData = NULL;
REFIT_VOLUME *SleepImageVolume;
UINT32 Attributes;
XBool HasIORTCVariables = false;
XBool HasHibernateInfo = false;
XBool HasHibernateInfoInRTC = false;
XBool HasIORTCVariables = false;
XBool HasHibernateInfo = false;
XBool HasHibernateInfoInRTC = false;

DBG("PrepareHibernation:\n");

Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/Injectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ EFI_KEYBOARD_INFO_PROTOCOL mKeyboardInfo = {
//EFIAPI
//GetQuirksConfig (IN OCQUIRKS_PROTOCOL *This,
// OUT OC_ABC_SETTINGS_4CLOVER *Buffer,
// OUT XBool *GopEnable
// OUT XBool *GopEnable
// )
//{
// DBG("GetQuirksConfig called\n");
Expand Down
6 changes: 3 additions & 3 deletions rEFIt_UEFI/Platform/KERNEL_AND_KEXT_PATCHES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "KERNEL_AND_KEXT_PATCHES.h"
#include "MacOsVersion.h"

bool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
XBool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
{
XBool ret = false;

Expand All @@ -35,7 +35,7 @@ bool ABSTRACT_PATCH::IsPatchEnabledByBuildNumber(const XString8& Build)
}


bool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)
XBool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)
{
XBool ret = false;

Expand Down Expand Up @@ -63,7 +63,7 @@ bool ABSTRACT_PATCH::IsPatchEnabled(const MacOsVersion& CurrOS)


//
//bool KERNEL_AND_KEXT_PATCHES::IsPatchEnabledByBuildNumber(const XString8& Build)
//XBool KERNEL_AND_KEXT_PATCHES::IsPatchEnabledByBuildNumber(const XString8& Build)
//{
// XBool ret = false;
//
Expand Down
Loading

0 comments on commit 83593a5

Please sign in to comment.