diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-03-26 18:42:09 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-03-26 18:42:09 -0400 |
| commit | ae29cd042ef9d87df5b05d25490a60376c730977 (patch) | |
| tree | 9ce55c5dc1e60e42c842fa8a39d3e4e80944f3ac /Source/Core | |
| parent | 76cece815744855a3dd32f3e64f4c77380246c6c (diff) | |
VideoInterface: Initialize union members directly where applicable
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/VideoInterface.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/Core/Core/HW/VideoInterface.h b/Source/Core/Core/HW/VideoInterface.h index 61236405ed..6d5a07edf9 100644 --- a/Source/Core/Core/HW/VideoInterface.h +++ b/Source/Core/Core/HW/VideoInterface.h @@ -81,20 +81,21 @@ enum union UVIVerticalTimingRegister { - u16 Hex; + u16 Hex = 0; struct { u16 EQU : 4; // Equalization pulse in half lines u16 ACV : 10; // Active video in lines per field (seems always zero) u16 : 2; }; - UVIVerticalTimingRegister(u16 _hex) { Hex = _hex; } - UVIVerticalTimingRegister() { Hex = 0; } + + UVIVerticalTimingRegister() = default; + explicit UVIVerticalTimingRegister(u16 hex) : Hex{hex} {} }; union UVIDisplayControlRegister { - u16 Hex; + u16 Hex = 0; struct { u16 ENB : 1; // Enables video timing generation and data request @@ -107,8 +108,9 @@ union UVIDisplayControlRegister u16 FMT : 2; // 0: NTSC, 1: PAL, 2: MPAL, 3: Debug u16 : 6; }; - UVIDisplayControlRegister(u16 _hex) { Hex = _hex; } - UVIDisplayControlRegister() { Hex = 0; } + + UVIDisplayControlRegister() = default; + explicit UVIDisplayControlRegister(u16 hex) : Hex{hex} {} }; union UVIHorizontalTiming0 @@ -248,7 +250,7 @@ union PictureConfigurationRegister union UVIHorizontalScaling { - u16 Hex; + u16 Hex = 0; struct { u16 STP : 9; // Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320) @@ -256,8 +258,9 @@ union UVIHorizontalScaling u16 HS_EN : 1; // Enable Horizontal Scaling u16 : 3; }; - UVIHorizontalScaling(u16 _hex) { Hex = _hex; } - UVIHorizontalScaling() { Hex = 0; } + + UVIHorizontalScaling() = default; + explicit UVIHorizontalScaling(u16 hex) : Hex{hex} {} }; // Used for tables 0-2 |
