Permalink
Browse files

AudioInterface: Use member initializers where applicable for unions

Migrates more code to the initialization capabilities available since C++11
  • Loading branch information...
lioncash committed May 30, 2018
1 parent b59cda1 commit 038bb9b3e16107c86bbb331288ec9f416f57f2e9
Showing with 4 additions and 5 deletions.
  1. +4 −5 Source/Core/Core/HW/AudioInterface.cpp
@@ -73,8 +73,8 @@ enum
// AI Control Register
union AICR
{
AICR() { hex = 0; }
AICR(u32 _hex) { hex = _hex; }
AICR() = default;
explicit AICR(u32 hex_) : hex{hex_} {}
struct
{
u32 PSTAT : 1; // sample counter/playback enable
@@ -88,20 +88,19 @@ union AICR
u32 AIDFR : 1; // AID Frequency (0=48khz 1=32khz)
u32 : 25;
};
u32 hex;
u32 hex = 0;
};
// AI Volume Register
union AIVR
{
AIVR() { hex = 0; }
struct
{
u32 left : 8;
u32 right : 8;
u32 : 16;
};
u32 hex;
u32 hex = 0;
};
// STATE_TO_SAVE

0 comments on commit 038bb9b

Please sign in to comment.