mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles, except for AfterUnion (which is false) when using clang-format -dump-config
This commit is contained in:
+13
-1
@@ -19,8 +19,20 @@ AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: true
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterObjCDeclaration: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
|
||||
@@ -2665,7 +2665,8 @@ void ARM64FloatEmitter::EncodeLoadStoreRegisterOffset(u32 size, bool load, ARM64
|
||||
|
||||
void ARM64FloatEmitter::EncodeModImm(bool Q, u8 op, u8 cmode, u8 o2, ARM64Reg Rd, u8 abcdefgh)
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
u8 hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -104,7 +104,8 @@ const int frsqrte_expected_dec[] = {
|
||||
|
||||
double ApproximateReciprocalSquareRoot(double val)
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
double valf;
|
||||
s64 vali;
|
||||
};
|
||||
@@ -178,7 +179,8 @@ double ApproximateReciprocal(double val)
|
||||
// The workaround for this is to just use namespace std within this function's scope
|
||||
// That way on real toolchains it will use the std:: variant like normal.
|
||||
using namespace std;
|
||||
union {
|
||||
union
|
||||
{
|
||||
double valf;
|
||||
s64 vali;
|
||||
};
|
||||
|
||||
@@ -57,14 +57,16 @@ static const u64 DOUBLE_SIGN = 0x8000000000000000ULL, DOUBLE_EXP = 0x7FF00000000
|
||||
static const u32 FLOAT_SIGN = 0x80000000, FLOAT_EXP = 0x7F800000, FLOAT_FRAC = 0x007FFFFF,
|
||||
FLOAT_ZERO = 0x00000000;
|
||||
|
||||
union IntDouble {
|
||||
union IntDouble
|
||||
{
|
||||
double d;
|
||||
u64 i;
|
||||
|
||||
explicit IntDouble(u64 _i) : i(_i) {}
|
||||
explicit IntDouble(double _d) : d(_d) {}
|
||||
};
|
||||
union IntFloat {
|
||||
union IntFloat
|
||||
{
|
||||
float f;
|
||||
u32 i;
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@ struct TraversalPacket
|
||||
{
|
||||
u8 type;
|
||||
TraversalRequestId requestId;
|
||||
union {
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u8 ok;
|
||||
|
||||
@@ -89,7 +89,8 @@ static bool s_disable_logging = false;
|
||||
|
||||
struct ARAddr
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
u32 address;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -264,7 +264,8 @@ struct Elf32_Rela
|
||||
struct Elf32_Dyn
|
||||
{
|
||||
s32 d_tag;
|
||||
union {
|
||||
union
|
||||
{
|
||||
u32 d_val;
|
||||
u32 d_ptr;
|
||||
} d_un;
|
||||
|
||||
@@ -225,7 +225,8 @@ struct DSP_Regs
|
||||
u16 cr;
|
||||
u16 sr;
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
u64 val;
|
||||
struct
|
||||
{
|
||||
@@ -236,7 +237,8 @@ struct DSP_Regs
|
||||
};
|
||||
} prod;
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
u32 val;
|
||||
struct
|
||||
{
|
||||
@@ -245,7 +247,8 @@ struct DSP_Regs
|
||||
};
|
||||
} ax[2];
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
u64 val;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -17,7 +17,8 @@ enum
|
||||
|
||||
#pragma pack(push, 4)
|
||||
|
||||
union FileHeader {
|
||||
union FileHeader
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 fileId;
|
||||
@@ -40,7 +41,8 @@ union FileHeader {
|
||||
u32 rawData[32];
|
||||
};
|
||||
|
||||
union FileFrameInfo {
|
||||
union FileFrameInfo
|
||||
{
|
||||
struct
|
||||
{
|
||||
u64 fifoDataOffset;
|
||||
|
||||
@@ -70,7 +70,8 @@ enum
|
||||
};
|
||||
|
||||
// AI Control Register
|
||||
union AICR {
|
||||
union AICR
|
||||
{
|
||||
AICR() { hex = 0; }
|
||||
AICR(u32 _hex) { hex = _hex; }
|
||||
struct
|
||||
@@ -90,7 +91,8 @@ union AICR {
|
||||
};
|
||||
|
||||
// AI Volume Register
|
||||
union AIVR {
|
||||
union AIVR
|
||||
{
|
||||
AIVR() { hex = 0; }
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -65,7 +65,8 @@ enum
|
||||
};
|
||||
|
||||
// UARAMCount
|
||||
union UARAMCount {
|
||||
union UARAMCount
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -75,7 +76,8 @@ union UARAMCount {
|
||||
};
|
||||
|
||||
// Blocks are 32 bytes.
|
||||
union UAudioDMAControl {
|
||||
union UAudioDMAControl
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -139,7 +141,8 @@ static AudioDMA g_audioDMA;
|
||||
static ARAM_DMA g_arDMA;
|
||||
UDSPControl g_dspState;
|
||||
|
||||
union ARAM_Info {
|
||||
union ARAM_Info
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -31,7 +31,8 @@ enum
|
||||
|
||||
// UDSPControl
|
||||
constexpr u16 DSP_CONTROL_MASK = 0x0C07;
|
||||
union UDSPControl {
|
||||
union UDSPControl
|
||||
{
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -271,7 +271,8 @@ struct PBBiquadFilter
|
||||
u16 a2;
|
||||
};
|
||||
|
||||
union PBInfImpulseResponseWM {
|
||||
union PBInfImpulseResponseWM
|
||||
{
|
||||
PBLowPassFilter lpf;
|
||||
PBBiquadFilter biquad;
|
||||
};
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace
|
||||
#define HILO_TO_32(name) ((name##_hi << 16) | name##_lo)
|
||||
|
||||
// Used to pass a large amount of buffers to the mixing function.
|
||||
union AXBuffers {
|
||||
union AXBuffers
|
||||
{
|
||||
struct
|
||||
{
|
||||
int* left;
|
||||
|
||||
@@ -108,7 +108,8 @@ enum
|
||||
};
|
||||
|
||||
// DI Status Register
|
||||
union UDISR {
|
||||
union UDISR
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -126,7 +127,8 @@ union UDISR {
|
||||
};
|
||||
|
||||
// DI Cover Register
|
||||
union UDICVR {
|
||||
union UDICVR
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -139,7 +141,8 @@ union UDICVR {
|
||||
UDICVR(u32 _hex) { Hex = _hex; }
|
||||
};
|
||||
|
||||
union UDICMDBUF {
|
||||
union UDICMDBUF
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -151,7 +154,8 @@ union UDICMDBUF {
|
||||
};
|
||||
|
||||
// DI DMA Address Register
|
||||
union UDIMAR {
|
||||
union UDIMAR
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -166,7 +170,8 @@ union UDIMAR {
|
||||
};
|
||||
|
||||
// DI DMA Address Length Register
|
||||
union UDILENGTH {
|
||||
union UDILENGTH
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -181,7 +186,8 @@ union UDILENGTH {
|
||||
};
|
||||
|
||||
// DI DMA Control Register
|
||||
union UDICR {
|
||||
union UDICR
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -192,7 +198,8 @@ union UDICR {
|
||||
};
|
||||
};
|
||||
|
||||
union UDIIMMBUF {
|
||||
union UDIIMMBUF
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -204,7 +211,8 @@ union UDIIMMBUF {
|
||||
};
|
||||
|
||||
// DI Config Register
|
||||
union UDICFG {
|
||||
union UDICFG
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -29,7 +29,8 @@ private:
|
||||
};
|
||||
|
||||
// EXI Status Register - "Channel Parameter Register"
|
||||
union UEXI_STATUS {
|
||||
union UEXI_STATUS
|
||||
{
|
||||
u32 Hex;
|
||||
// DO NOT obey the warning and give this struct a name. Things will fail.
|
||||
struct
|
||||
@@ -55,7 +56,8 @@ private:
|
||||
};
|
||||
|
||||
// EXI Control Register
|
||||
union UEXI_CONTROL {
|
||||
union UEXI_CONTROL
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -24,7 +24,8 @@ private:
|
||||
read = 0xa2
|
||||
};
|
||||
|
||||
union UAD16Reg {
|
||||
union UAD16Reg
|
||||
{
|
||||
u32 U32;
|
||||
u32 U8[4];
|
||||
};
|
||||
|
||||
@@ -38,7 +38,8 @@ private:
|
||||
|
||||
u32 m_position;
|
||||
int command;
|
||||
union UStatus {
|
||||
union UStatus
|
||||
{
|
||||
u16 U16;
|
||||
u8 U8[2];
|
||||
struct
|
||||
|
||||
@@ -49,7 +49,8 @@ enum
|
||||
MI_UNKNOWN2 = 0x05A,
|
||||
};
|
||||
|
||||
union MIRegion {
|
||||
union MIRegion
|
||||
{
|
||||
u32 hex;
|
||||
struct
|
||||
{
|
||||
@@ -58,7 +59,8 @@ union MIRegion {
|
||||
};
|
||||
};
|
||||
|
||||
union MIProtType {
|
||||
union MIProtType
|
||||
{
|
||||
u16 hex;
|
||||
struct
|
||||
{
|
||||
@@ -70,7 +72,8 @@ union MIProtType {
|
||||
};
|
||||
};
|
||||
|
||||
union MIIRQMask {
|
||||
union MIIRQMask
|
||||
{
|
||||
u16 hex;
|
||||
struct
|
||||
{
|
||||
@@ -83,7 +86,8 @@ union MIIRQMask {
|
||||
};
|
||||
};
|
||||
|
||||
union MIIRQFlag {
|
||||
union MIIRQFlag
|
||||
{
|
||||
u16 hex;
|
||||
struct
|
||||
{
|
||||
@@ -96,7 +100,8 @@ union MIIRQFlag {
|
||||
};
|
||||
};
|
||||
|
||||
union MIProtAddr {
|
||||
union MIProtAddr
|
||||
{
|
||||
u32 hex;
|
||||
struct
|
||||
{
|
||||
@@ -111,7 +116,8 @@ union MIProtAddr {
|
||||
};
|
||||
};
|
||||
|
||||
union MITimer {
|
||||
union MITimer
|
||||
{
|
||||
u32 hex;
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -59,7 +59,8 @@ enum
|
||||
};
|
||||
|
||||
// SI Channel Output
|
||||
union USIChannelOut {
|
||||
union USIChannelOut
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -71,7 +72,8 @@ union USIChannelOut {
|
||||
};
|
||||
|
||||
// SI Channel Input High u32
|
||||
union USIChannelIn_Hi {
|
||||
union USIChannelIn_Hi
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -85,7 +87,8 @@ union USIChannelIn_Hi {
|
||||
};
|
||||
|
||||
// SI Channel Input Low u32
|
||||
union USIChannelIn_Lo {
|
||||
union USIChannelIn_Lo
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -106,7 +109,8 @@ struct SSIChannel
|
||||
};
|
||||
|
||||
// SI Poll: Controls how often a device is polled
|
||||
union USIPoll {
|
||||
union USIPoll
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -125,7 +129,8 @@ union USIPoll {
|
||||
};
|
||||
|
||||
// SI Communication Control Status Register
|
||||
union USIComCSR {
|
||||
union USIComCSR
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -151,7 +156,8 @@ union USIComCSR {
|
||||
};
|
||||
|
||||
// SI Status Register
|
||||
union USIStatusReg {
|
||||
union USIStatusReg
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
@@ -190,7 +196,8 @@ union USIStatusReg {
|
||||
};
|
||||
|
||||
// SI EXI Clock Count
|
||||
union USIEXIClockCount {
|
||||
union USIEXIClockCount
|
||||
{
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user