GCC/Clang compatibility

- and some menu fixes
This commit is contained in:
Nikolaj Schlej 2016-03-01 09:52:25 +01:00
parent f729dd58b7
commit 867f507fac
4 changed files with 19 additions and 12 deletions

View file

@ -13,7 +13,8 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <QObject>
#include "ffs.h"
const std::vector<QByteArray> FFSv2Volumes({
// This is a workaround for the lack of static std::vector initializer before C++11
const QByteArray FFSv2VolumesInt[] = {
EFI_FIRMWARE_FILE_SYSTEM_GUID,
EFI_FIRMWARE_FILE_SYSTEM2_GUID,
EFI_APPLE_BOOT_VOLUME_FILE_SYSTEM_GUID,
@ -21,11 +22,12 @@ const std::vector<QByteArray> FFSv2Volumes({
EFI_INTEL_FILE_SYSTEM_GUID,
EFI_INTEL_FILE_SYSTEM2_GUID,
EFI_SONY_FILE_SYSTEM_GUID
});
const std::vector<QByteArray> FFSv3Volumes({
EFI_FIRMWARE_FILE_SYSTEM3_GUID
});
};
// This number must be updated if the array above is grown
#define FFSv2VolumesIntSize 7
const std::vector<QByteArray> FFSv2Volumes(FFSv2VolumesInt, FFSv2VolumesInt + FFSv2VolumesIntSize);
// Luckily, FFSv3Volumes now only has 1 element
const std::vector<QByteArray> FFSv3Volumes(1, EFI_FIRMWARE_FILE_SYSTEM3_GUID);
const UINT8 ffsAlignmentTable[] =
{ 0, 4, 7, 9, 10, 12, 15, 16 };